We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
role="switch" should both map to HTML element button . Here's official web standard doc on the switch role: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/switch_role, it uses the button HTML element (also here). Another doc of button HTML element, with switch in Permitted ARIA roles.
button
switch
Permitted ARIA roles
It should be on the web
https://codesandbox.io/p/sandbox/swtich-role-5qjrcy
We should map the switch role to button html element in react-native-web here by this one line change:
react-native-web
switch: 'button'
The text was updated successfully, but these errors were encountered:
switch can be used with non-button elements too, like div and input[type=checkbox]
div
input[type=checkbox]
Sorry, something went wrong.
@necolas Currently I want to customize mapping role="switch" to button element in my code. Can I define somewhere or pass in some props?
No branches or pull requests
Is there an existing issue for this?
Describe the issue
role="switch" should both map to HTML element
button
.Here's official web standard doc on the
switch
role: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/switch_role, it uses thebutton
HTML element (also here). Another doc ofbutton
HTML element, withswitch
inPermitted ARIA roles
.Expected behavior
It should be on the web
Steps to reproduce
Test case
https://codesandbox.io/p/sandbox/swtich-role-5qjrcy
Additional comments
Solution
We should map the
switch
role tobutton
html element inreact-native-web
here by this one line change:The text was updated successfully, but these errors were encountered: