Skip to content

[data grid] Expandable rows are not accessible #10032

@ArmandRedgate

Description

@ArmandRedgate

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example:

https://mui.com/x/react-data-grid/tree-data/

Steps:

  1. Expand one of the rows
  2. Inspect the accessibility tree

Order ID: 65425

Current behavior 😯

The current data grid example for expandable rows is not accessible as it does not follow an the correct pattern.

To illustrate the issue, lets look at the component and its the accessibility tree:

Component

Accessibility tree, annotated to show missing aria properties

As the accessibility tree illustrates, there is nothing to relate to non-sighted users that one of the rows is expanded and that some of the rows are child rows of another.

Expected behavior 🤔

When expandable rows are present the Treegrid pattern should be employed.

From an aria property point of view, this means adding properties like:

  • role=treegrid to indicate this is a tree grid
  • aria-level to determine the depth
  • aria-expanded to say if the current row is expanded (leave it undefined to say this is a leaf node)
  • aria-setsize to determine how many children there are
  • aria-posinset to say what item you are on at the current level

I've not had a proper look at the keyboard interactions. They may be fine as or or require some changes too.

Context 🔦

We've started using MUI recently, and are looking to replace our expandable row patterns with poor accessibility with standard approaches, and were hoping MUI had an out-of-the-box solution.

We pay for MUI-X, and were hoping data-grid would implement these correctly, but that doesn't seem to currently be the case.

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Chrome Version 115.0.5790.171 (Official Build) (64-bit)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions