Skip to content

feat(a11y): implement roving tabindex grid navigation for Marketplace… - #1485

Open
digofavour-hub wants to merge 1 commit into
CalloraOrg:mainfrom
digofavour-hub:feat/marketplace-roving-grid
Open

digofavour-hub wants to merge 1 commit into
CalloraOrg:mainfrom
digofavour-hub:feat/marketplace-roving-grid

Conversation

@digofavour-hub

Copy link
Copy Markdown

Closes #1413

Summary

Implements the roving tabindex keyboard navigation pattern for the Marketplace API card grid so keyboard users have a single tab stop for the grid and can navigate between cards using arrow keys, Home/End, and Ctrl+Home/Ctrl+End.

Changes

  • src/hooks/useRovingGrid.ts: New hook that tracks the active card index, computes visual rows/columns dynamically from offsetTop, handles ArrowLeft/ArrowRight (±1), ArrowUp/ArrowDown (±columns, clamped, no wrap), Home/End (row start/end), and Ctrl+Home/Ctrl+End (grid start/end), ignores key events from inner interactive controls (button, input, etc.), and resets/clamps when dependencies or item counts change.
  • src/components/ApiCard.tsx: Added optional tabIndex (default 0) and onFocus props to preserve backwards compatibility at all other call sites.
  • src/pages/MarketplacePage.tsx: Wired useRovingGrid into .marketplace-grid with role="group" and aria-label="Marketplace APIs" (preserving role="button" on ApiCard and avoiding invalid role="grid" nesting), resetting active index on page, filter, or density changes.
  • src/hooks/useRovingGrid.test.tsx: Unit tests stubbing offsetTop for a 3-column grid covering arrow navigation, clamping, partial last row, Home/End, Ctrl+Home/Ctrl+End, inner button/input event ignoring, and reset/clamping.
  • src/pages/MarketplacePage.test.tsx: Added integration test asserting a single tabindex="0" card in the grid, arrow-key focus movement, and preservation of the c compare shortcut.

@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@digofavour-hub 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

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.

Add roving-tabindex arrow-key navigation across the Marketplace ApiCard grid

1 participant