[Switch][Checkbox][Radio] Remove `aria-disabled` from root span
Fixes #45436
- [x] I have followed (at least) the PR section of the contributing guide.
Checkbox: https://deploy-preview-46318--material-ui.netlify.app/material-ui/react-checkbox/ Switch: https://deploy-preview-46318--material-ui.netlify.app/material-ui/react-switch/ Radio: https://deploy-preview-46318--material-ui.netlify.app/material-ui/react-radio-button/#direction
Hey @siriwatknp, please can you review this PR. If anything needs to be added, please let me know, I will update the PR. Thanks!
Netlify deploy preview
https://deploy-preview-46318--material-ui.netlify.app/
Bundle size report
| Bundle | Parsed size | Gzip size |
|---|---|---|
| @mui/material | ▼-11B(0.00%) | ▼-2B(0.00%) |
| @mui/lab | 0B(0.00%) | 0B(0.00%) |
| @mui/system | 0B(0.00%) | 0B(0.00%) |
| @mui/utils | 0B(0.00%) | 0B(0.00%) |
Generated by :no_entry_sign: dangerJS against bc89849798b51e93dbccf66b75af7e6796de3ce9
@KirankumarAmbati @siriwatknp Let's keep this PR focused on aria-disabled. The role="switch" discussion can happen separately. Also, role="switch" should be added on the <input> so we can keep the discussions separate.
In this PR, I removed aria-disabled from the root <span> of the Switch, Checkbox, and Radio components. Since SwitchBase is shared, this affects all three. As per my research, it's correct to remove it because aria-disabled has no effect on elements without a valid ARIA role.
The role="switch" issue is already tracked in #23216, and I’ve opened a PR for it: #46482.
@siriwatknp Can you review this? See https://github.com/mui/material-ui/pull/46318#issuecomment-3032557137.