-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[material-ui][Checkbox] Add aria-checked
attribute for indeterminate state in Checkbox component
#46497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…state in Checkbox component
Netlify deploy previewhttps://deploy-preview-46497--material-ui.netlify.app/ Bundle size report
|
@@ -171,6 +171,10 @@ const Checkbox = React.forwardRef(function Checkbox(inProps, ref) { | |||
: externalInputProps, | |||
{ | |||
'data-indeterminate': indeterminate, | |||
...(indeterminate && { | |||
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked#values | |||
'aria-checked': 'mixed', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken from joy-ui
material-ui/packages/mui-joy/src/Checkbox/Checkbox.tsx
Lines 331 to 333 in 544079d
...(indeterminate && { | |
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked#values | |
'aria-checked': 'mixed' as const, |
aria-checked
attribute for indeterminate state in Checkbox component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes mui/mui-x#18740
found this issue from mui/mui-x#18740