# Accessibility
Package: @mantine/data-grid
Import: import { Accessibility } from '@mantine/data-grid';
Description: DataGrid keyboard navigation, ARIA attributes, and screen reader support

## 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 have `aria-expanded`
* Checkboxes, expand toggles and the column menu button are labelled with the `labels` prop 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 custom `editComponent`
* The row reorder grip is pointer-only and hidden from assistive technology
* The grid has `aria-busy` while `loading` is set, a row with a pending async save has `aria-busy`, invalid editor cells have `aria-invalid`
* The virtualized body uses `role="grid"` with `aria-rowcount`, `aria-rowindex` and `aria-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.
