Skip to content

[DataGrid] [docs] Only use one aria-label on customizing checkbox column code snippet #22141

Open
StylesTrip wants to merge 7 commits intomui:masterfrom
StylesTrip:checkbox-column-customize-update
Open

[DataGrid] [docs] Only use one aria-label on customizing checkbox column code snippet #22141
StylesTrip wants to merge 7 commits intomui:masterfrom
StylesTrip:checkbox-column-customize-update

Conversation

@StylesTrip
Copy link
Copy Markdown
Contributor

Issue

The code snippet found under the Customizing the checkbox column section which is under the Custom checkbox column section -> https://mui.com/x/react-data-grid/row-selection/#custom-checkbox-column is generating two aria-labels, one for the tooltip and one for the checkbox input. Both are being read by, at the least, Voiceover on Mac.

image image

Proposed solution

The proposed changes in this request uses the describeChild prop on the Tooltip and updates the aria-label on the GridRowCheckbox. This removes the aria-label on the tooltip and Voiceover now only reads the aria-label from the checkbox input. This change keeps the Tooltip visual label the same.

image image

Demo of changes

I also created a demo to show the difference between the two: https://stackblitz.com/edit/np5rf22s?file=src%2FDemo.tsx

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented Apr 22, 2026

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@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


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

@zannager zannager added the scope: data grid Changes related to the data grid. label Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: data grid Changes related to the data grid.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants