Skip to content

[data grid] Fix accessibility violation in detail panel toggle column header#22178

Open
michelengelen wants to merge 1 commit intomui:masterfrom
michelengelen:bug/22140
Open

[data grid] Fix accessibility violation in detail panel toggle column header#22178
michelengelen wants to merge 1 commit intomui:masterfrom
michelengelen:bug/22140

Conversation

@michelengelen
Copy link
Copy Markdown
Member

@michelengelen michelengelen commented Apr 23, 2026

The detail panel toggle column header had conflicting ARIA attributes that violated WAI-ARIA 1.2 in two successive ways:

This PR replaces both patterns with <span style={visuallyHidden}>{colDef.headerName}</span>. The visually-hidden span contains no ARIA attributes. The columnheader's accessible name is computed from its text content via the standard accname algorithm. The text remains invisible in the narrow column header, so there is no visual regression and no risk of re-triggering the VoiceOver double-reading issue fixed in #14482.

Fixes #22140

Signed-off-by: michel <jsnerdic@gmail.com>
@michelengelen michelengelen self-assigned this Apr 23, 2026
@michelengelen michelengelen added type: bug It doesn't behave as expected. accessibility a11y scope: data grid Changes related to the data grid. labels Apr 23, 2026
@code-infra-dashboard
Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 🔺+128B(+0.03%) 🔺+60B(+0.04%)
@mui/x-data-grid-premium 🔺+128B(+0.02%) 🔺+64B(+0.03%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Deploy preview

https://deploy-preview-22178--material-ui-x.netlify.app/


Check out the code infra dashboard for more information about this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y scope: data grid Changes related to the data grid. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[data grid] Detail panel toggle header has conflicting aria-label and role="presentation"

1 participant