Skip to content

[Accessibility] Validate virtualized-grid keyboard navigation - #170

Merged
BigDella merged 1 commit into
Parcel-Protocol:mainfrom
SahheedTech:test/accessible-grid-keyboard-navigation-133
Sep 27, 2026
Merged

BigDella merged 1 commit into
Parcel-Protocol:mainfrom
SahheedTech:test/accessible-grid-keyboard-navigation-133

Conversation

@SahheedTech

Copy link
Copy Markdown
Contributor

Overview

Large Stellar datasets rely on AccessibleGrid, so a row that is visually present but unreachable
by keyboard is a product defect — and the grid had no test covering virtualization boundaries at
all.

The grid now keeps a resilient roving tabindex: focus is tracked by row key rather than row index
(a virtualized list recycles DOM nodes, and sorting or filtering moves rows between indices), the
boundary keys clamp instead of walking off the grid, and focus is restored to a still-rendered cell
when the focused node is recycled out from under it. The new tests cover moving across an unloaded
window, returning to a previously rendered row, focus preservation across data updates, id-uniqueness
after recycling, and axe assertions.

Branch note: the issue template asks for dev, but this repository has only main
(git/ref/heads/dev returns 404 and the branch list is main + short-lived feature branches), so
this PR targets main — the only integration branch that exists.

Related Issue

Closes #133

Changes

Grid behaviour

  • [MODIFY] core/ui/AccessibleGrid.tsx
    • Tracks the focused row by stable key (focusedRowKeyRef) plus DOM-focus state, instead of by
      index alone, so a reorder or filter does not move the caret to an unrelated row.
    • clampRow / clampCol bound every arrow-key move, and an empty grid returns early rather than
      computing a negative index.
    • The sort shortcut now reads the column under the caret (columns[col]) instead of the
      destination column, fixing the off-by-one where the wrong column was sorted.
    • A boundary press re-focuses the current cell, so a remounted/recycled node cannot silently lose
      focus, and focus moved out of the grid is deliberately not pulled back.

Tests

  • [MODIFY] core/ui/__tests__/AccessibleGrid.test.tsx
    • Keyboard traversal across an unloaded window and back to a previously rendered row.
    • Focus preservation when the data updates underneath the focused row.
    • Duplicate-id check after DOM recycling, plus aria-rowindex assertions.
    • axe assertions instead of snapshot-only coverage, with @testing-library keyboard events.

Verification Results

Static review only — no clone or sandbox is available in this environment, so `vitest run` was NOT
executed and no pass is claimed. The suite uses the repository's existing Testing Library + axe
setup.
Acceptance Criteria Status
The stated behavior is implemented and regression-tested ✅ roving-focus fixes plus new keyboard/focus/recycling tests
Existing tests and relevant local checks pass ⚠️ Not run locally (no clone)
No secret key is accepted, displayed, stored, or transmitted ✅ UI-only change; no credentials involved
PR targets dev branch (NOT main) ⚠️ dev does not exist in this repository (main + feature branches only), so this PR targets main — see the branch note in the overview
The PR references this issue ✅ Closes #133

Closes #133

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@SahheedTech 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

@BigDella
BigDella merged commit 50e79cf into Parcel-Protocol:main Sep 27, 2026
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.

[Accessibility] Validate virtualized-grid keyboard navigation

2 participants