Accessible treegrid keyboard navigation and ARIA
Implements WAI-ARIA treegrid semantics. Rows expose aria-level, aria-expanded, aria-setsize and aria-posinset, and a full keyboard model covers expanding, collapsing and moving to the parent. Screen reader and keyboard-only users can then navigate the hierarchy efficiently.
Planned. This page shows the specification from issue #197. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A file-system tree with keyboard focus on the first row and an overlay showing the live ARIA attributes of the focused row.
Expected behavior
Right Arrow expands a collapsed node, or moves to its first child if already expanded. Left Arrow collapses the node, or moves to its parent if already collapsed. Home and End move to the first and last visible row. '*' expands all siblings. The inspector updates on every move.
Planned API surface
treeKeyboardNavigationariaLabelTreeColumngetRowAriaLabelfocusRowonTreeNavigateAcceptance criteria
- aria-level is 1-based and correct at all depths (pending)
- aria-setsize and aria-posinset reflect sibling counts even when virtualization is on (pending)
- aria-expanded is absent on leaf rows (pending)
- Left Arrow on a collapsed child moves focus to its parent (pending)
- Focus is preserved when a collapse removes the focused descendant (focus moves to the collapsing ancestor) (pending)
- Passes an automated axe audit with zero violations (pending)