Skip to content

[Checkbox] Set the native indeterminate state on the input - #49053

Open
lazerg wants to merge 2 commits into
mui:masterfrom
lazerg:fix/issue-49051-checkbox-indeterminate
Open

[Checkbox] Set the native indeterminate state on the input#49053
lazerg wants to merge 2 commits into
mui:masterfrom
lazerg:fix/issue-49051-checkbox-indeterminate

Conversation

@lazerg

@lazerg lazerg commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Checkbox sets aria-checked="mixed" when indeterminate is true, but the input's native indeterminate property is never set. The two disagree, so axe reports an aria-conditional-attr violation ("Remove aria-checked, or set it to false to match the real checkbox state"), and browsers that expose the mixed state from the native property alone never report it.

React does not forward indeterminate to the DOM, so the property is assigned through a ref on the input slot, and reapplied on change since activating a checkbox clears it. The prop description said the native state was left alone on purpose, which is no longer true, so it and the generated API docs are updated.

Fixes #49051

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49053--material-ui.netlify.app/
QR code for https://deploy-preview-49053--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+143B(+0.03%) 🔺+64B(+0.04%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Checkbox] Indeterminate Checkbox Axe scan failure

1 participant