The DataTable component (src/components/data-table.tsx) supports row selection via click, but does not implement keyboard navigation. Users cannot navigate between rows using arrow keys, select rows with Enter/Space, or open row details with Enter. This violates WCAG 2.1 keyboard accessibility requirements.
Why this is architecturally hard
- Table uses TanStack Table's
useReactTable hook without built-in keyboard navigation primitives
- Virtualized rows are absolutely positioned, making traditional DOM focus management incompatible
- Table body must maintain a "roving tabindex" pattern where only one row is focusable at a time
Proposed design
Implement a useTableKeyboardNavigation hook that maintains focusedIndex state, listens for ArrowUp/ArrowDown/Enter/Space key events, updates focus index within bounds, sets tabIndex on focused row, and triggers selection on Enter/Space.
Acceptance criteria
Getting started
Files: src/components/data-table.tsx
The
DataTablecomponent (src/components/data-table.tsx) supports row selection via click, but does not implement keyboard navigation. Users cannot navigate between rows using arrow keys, select rows with Enter/Space, or open row details with Enter. This violates WCAG 2.1 keyboard accessibility requirements.Why this is architecturally hard
useReactTablehook without built-in keyboard navigation primitivesProposed design
Implement a
useTableKeyboardNavigationhook that maintainsfocusedIndexstate, listens for ArrowUp/ArrowDown/Enter/Space key events, updates focus index within bounds, sets tabIndex on focused row, and triggers selection on Enter/Space.Acceptance criteria
Getting started
Files:
src/components/data-table.tsx