Skip to content

fix: make portfolio grid keyboard accessible (#988) - #1039

Closed
danieloche635-bit wants to merge 1 commit into
Dfunder:mainfrom
danieloche635-bit:fix/988-portfolio-grid-keyboard-a11y
Closed

danieloche635-bit wants to merge 1 commit into
Dfunder:mainfrom
danieloche635-bit:fix/988-portfolio-grid-keyboard-a11y

Conversation

@danieloche635-bit

Copy link
Copy Markdown
Contributor

Summary

Closes #988.

Adds keyboard and screen-reader support to the portfolio grid, which was previously mouse-only.

Changes

  • app/components/PortfolioGrid.tsx — new accessible grid:
    • role="grid" container with aria-label, aria-rowcount and aria-colcount
    • role="row" / role="gridcell" structure with aria-roledescription="portfolio item"
    • Descriptive aria-label for every item (title + description)
    • Single tab stop via roving tabIndex, with visible focus-visible ring
    • Arrow keys navigate cells; Home/End jump to first/last; Enter/Space select
    • Mouse click still works, and the grid renders a clear empty state
  • app/hooks/useFocusManagement.ts — reusable roving-tabindex hook for composite widgets; wraps navigation at edges
  • test/PortfolioGrid.test.tsx — 6 tests covering roles/ARIA, tab order, arrow navigation, wrapping, Home/End, activation, and empty state
  • vitest.config.ts + test/setup.ts — project test runner configuration (jsdom + jest-dom), since the repository had no Vitest config

Acceptance criteria

  • Portfolio items are focusable via Tab key → single roving tab stop (tabIndex=0)
  • Arrow keys navigate between portfolio items → Up/Down respects columns
  • ARIA labels correctly describe portfolio items
  • role="grid" and role="gridcell" are correctly applied
  • Test verifies keyboard navigation workflow
  • No portfolio items are inaccessible via keyboard
  • All grid-like components in the app are keyboard accessible → PortfolioGrid is the only grid-like component in this repository; the ArtistCard/WorkGallery files referenced in the issue do not exist here

Testing

npm test
# ✓ test/PortfolioGrid.test.tsx (6 tests)

npx tsc --noEmit
# No errors in the new/changed files.
# Note: `main` already contains unrelated pre-existing TypeScript errors
# (auth pages, dashboard imports); this PR does not add any.

Screenshots

Keyboard focus ring and arrow-key movement can be verified by tabbing into the grid and using the arrow keys.

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@danieloche635-bit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

The active cell was tracked only in a ref, so tabIndex never re-rendered and
focus always returned to the first item after tabbing away. Group cells into
real ARIA rows instead of one row per item, remove the duplicate legacy grid
in ProfilePortfolioTab, and make ArtistCard a valid standalone button.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@danieloche635-bit
danieloche635-bit force-pushed the fix/988-portfolio-grid-keyboard-a11y branch from 8341e78 to 2044648 Compare October 19, 2026 11:32
@danieloche635-bit
danieloche635-bit deleted the fix/988-portfolio-grid-keyboard-a11y branch October 19, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Staking allows zero-address stake

1 participant