Commit 429a9bc
committed
Tree: Implement WAI-ARIA treegrid keyboard navigation
Update Tree accessibility to follow the WAI-ARIA treegrid pattern:
Keyboard navigation changes:
- Right arrow: Expand collapsed row, or move to first cell if expanded
- Left arrow: Collapse expanded row, or move to row focus if on first cell
- Tab/Shift-Tab: Move between focusable elements (buttons, editable cells)
in the current row, then exit tree when no more focusable elements
- Up/Down arrows: Navigate between rows (unchanged)
Accessibility improvements:
- Use ROLE_TREE_GRID for multi-column trees
- Use ROLE_ROW for tree items (instead of ROLE_TREE_ITEM)
- Use ROLE_CELL for individual column cells
- Use ROLE_COLUMN_HEADER for column titles
- Hide column headers from accessibility tree when not visible
- Parent buttons to row element (not cell) to prevent announcement clutter
- Only set expanded/collapsed state on items with children
- Set active_descendant on tree grid for screen reader focus tracking
Reference: https://www.w3.org/WAI/ARIA/apg/patterns/treegrid/1 parent 5b4cbd2 commit 429a9bc
File tree
5 files changed
+223
-48
lines changed- doc/classes
- drivers/accesskit
- scene/gui
- servers/display
5 files changed
+223
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2774 | 2774 | | |
2775 | 2775 | | |
2776 | 2776 | | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
2777 | 2780 | | |
2778 | 2781 | | |
2779 | 2782 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
| 1643 | + | |
1643 | 1644 | | |
1644 | 1645 | | |
1645 | 1646 | | |
| |||
0 commit comments