WarUI

Treegrid Pattern for Hierarchical Data

GRID-A23-F14P0baselinePlanned

Hierarchical data renders with role=treegrid. Rows carry aria-level, aria-expanded, aria-setsize and aria-posinset. Users can expand and collapse rows with the keyboard and hear their depth and position.

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 three-level org hierarchy with the first level expanded.

Expected behavior

ArrowRight on a collapsed row expands it, and on an expanded row moves to the first child. ArrowLeft collapses the row or moves to its parent. Lazy children show busy state and announce once loaded.

Planned API surface

accessibilityPattern: 'treegrid'treeDatagetChildrenexpandRow()collapseRow()rowExpandrowCollapselazyChildren

Acceptance criteria

  • The root has role=treegrid. (pending)
  • Each row has aria-level starting at 1. (pending)
  • Parent rows have aria-expanded, and leaf rows omit it. (pending)
  • aria-setsize and aria-posinset reflect siblings even under virtualization. (pending)
  • Asterisk (*) expands all siblings at the current level. (pending)