WarUI

Roving Tabindex Keyboard Navigation

GRID-A23-F03P0baselinePlanned

WarGrid is a single tab stop with a roving tabindex. Arrow keys, Home/End, Ctrl+Home/End and PageUp/PageDown move between cells. This meets WCAG 2.1.1 Keyboard and follows the established composite widget pattern.

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

Live example

A 10-column, 200-row grid. A live 'focused cell' indicator shows the row and column index. A key log lists the last 10 keystrokes.

Expected behavior

Only one cell has tabindex=0 at a time. Tab moves focus out of the grid, and Shift+Tab back in restores the last focused cell. PageDown moves by pageSize rows.

Planned API surface

keyboardNavigationpageSizewrapNavigationfocusCell()getFocusedCell()cellFocuskeyDown

Acceptance criteria

  • Exactly one descendant of the grid has tabindex=0, and all other cells have tabindex=-1. (pending)
  • The arrow keys move focus one cell in the corresponding direction and stop at edges unless wrapNavigation is true. (pending)
  • Home/End move to the first/last cell in the row, and Ctrl+Home/Ctrl+End move to the first/last cell in the grid. (pending)
  • Re-entering the grid with Tab restores focus to the previously focused cell. (pending)
  • In RTL layouts, ArrowLeft and ArrowRight are mirrored. (pending)