[Switch] Use role="switch" #23216
Labels
accessibility
a11y
component: switch
This is the name of the generic UI component, not the React module!
on hold
There is a blocker, we need to wait
Milestone
Summary 💡
The switch component is announced like a checkbox, it should be announced like a switch.
Examples 🌈
I have seen the role used in react-switch. After some digging, I could find this accessible resource that goes into more detail: https://scottaohara.github.io/a11y_styled_form_controls/src/checkbox--switch/. It seems that it's still too early to use the role, screenreaders support isn't high enough but we can revisit it in a year.
Motivation 🔦
Improve the distinction between
Switch
andCheckbox
for screen readers. It's important per https://next.material-ui.com/components/switches/#when-to-use.The text was updated successfully, but these errors were encountered: