Behavior comparison
Data grid navigates rows and columns of cells with arrow keys; Tree view expands and collapses parent-child nodes in a hierarchy.
Decision
Should people read tabular data, interact cell by cell, or expand a hierarchy?
| Dimension | Data gridData grid | Tree viewTree view |
|---|---|---|
| Trigger | Tab enters one managed focus point; directional keys then move among cells. | Tab enters the tree; arrows move focus and expand or collapse parent items. |
| Modality | Non-modal composite widget with an internal focus model. | Non-modal composite widget for a hierarchical collection. |
| Placement | A bounded tabular workspace with persistent headers and a visible active cell. | A vertically ordered hierarchy whose indentation and disclosure state expose parent-child relationships. |
| Interactivity | Roving focus, arrow navigation, sorting, selection, and editing are explicit; focus and selection remain distinguishable. | Managed focus, expand/collapse, optional selection, and activation are separate and visibly distinguishable. |
| Focus | Use one consistent roving-tabindex or aria-activedescendant strategy, keep the active cell visible, and never put every cell in the page tab sequence. | Use roving tabindex or aria-activedescendant consistently, and keep visible focus distinct from aria-selected or aria-checked. |
| Dismissal | The grid is not dismissed; Escape exits cell interaction and restores grid navigation. | The tree is not dismissed; Left Arrow collapses an open parent, and Escape is not a required tree command. |
| Accessible role | grid > row > (columnheader | rowheader | gridcell) | tree > treeitem + group |
| Use case | Large tabular data needs efficient keyboard navigation | People navigate a true parent-child hierarchy |
| Mobile behavior | Provide a tested touch model or a simpler list/table alternative when dense two-dimensional operation is impractical. | Use generous disclosure targets and consider progressive drill-down when deep indentation leaves too little room. |
Audience measurement
With your consent, Google Analytics and aggregate first-party counters measure site usage to help us improve it. These counters contain no search text, candidate, session identifier, or event identifier. You can change your choice anytime via “Cookies” in the footer.