Accessibility
DataGrid keyboard navigation, ARIA attributes, and screen reader support
Package
Focus model
By default, rows are the focus targets: Tab moves focus to the first row and arrow keys move it between rows.
With withCellSelection, cells are the focus targets. The list view always uses the row model.
Keyboard navigation
Row focus model:
Cell focus model (withCellSelection):
Editing:
Header:
With withColumnReorder and withColumnMenu, the Move left and Move right menu items reorder
columns from the keyboard. Keys pressed inside controls within a row (checkboxes, buttons, editors)
are not handled by the row.
ARIA attributes
- Sortable headers have
aria-sort, group rows and expand toggles havearia-expanded - Checkboxes, expand toggles and the column menu button are labelled with the
labelsprop values, translate them for your users - The default editor is labelled with the column label. Use
getColumnLabel(cell.column)to get the same label in a customeditComponent - The row reorder grip is pointer-only and hidden from assistive technology
- The grid has
aria-busywhileloadingis set, a row with a pending async save hasaria-busy, invalid editor cells havearia-invalid - The virtualized body uses
role="grid"witharia-rowcount,aria-rowindexandaria-colindex
Focus management
- When editing ends, focus returns to the row or to the cell. The default editor is focused and its content is selected when editing starts
- In virtualized mode, rows that scroll out of view are unmounted. Move focus with the arrow keys to keep it inside the rendered rows
Screen readers
The table body renders semantic table elements, the virtualized body relies on the ARIA grid roles listed above. The footer status text, the row count and the selection bar count are not live regions.