WarUI

Focus and selection with row and column virtualization

GRID-A11-F23P1baselinePlanned

Ensures that keyboard focus and selection work when only a window of rows and columns exists in the DOM. The focused cell is kept rendered even when scrolled away, and ARIA counts reflect the full data set. Without this, virtualization breaks screen readers and focus.

Planned. This page shows the specification from issue #189. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid with 100k rows and 200 columns, fully virtualized, with a DOM node counter overlay.

Expected behavior

After a scroll away, the next arrow press resumes from the focused cell (scrolling back), or moves into the viewport, depending on the setting. The DOM node count stays bounded. A screen reader reports, for example, row 100 of 100,000.

Planned API surface

virtualizationkeepFocusedCellRendered: booleanaria-rowcountaria-colcountscrollToCell(rowKey, colId, align)

Acceptance criteria

  • The grid exposes aria-rowcount and aria-colcount for the full data set, and each rendered row and cell has aria-rowindex and aria-colindex. (pending)
  • With keepFocusedCellRendered, the focused cell's DOM node persists while scrolled out of view. (pending)
  • Arrow navigation into unrendered regions renders the target before focusing it, with no focus flicker to the body. (pending)
  • Selected rows that are scrolled out of view remain selected in state. (pending)
  • The DOM node count stays within the configured overscan bounds plus the retained focused cell. (pending)