-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Audit focus states on disabled components #734
base: master
Are you sure you want to change the base?
Audit focus states on disabled components #734
Conversation
Netlify deploy preview |
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.
Thanks for working on this! With a few tweaks this will be good to merge.
@@ -98,6 +98,7 @@ const CheckboxRoot = React.forwardRef(function CheckboxRoot( | |||
extraProps: { | |||
...otherProps, | |||
...otherGroupProps, | |||
disabled, |
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.
Instead of passing disabled
here, it should be set by useCheckboxRoot
's getButtonProps
. You can remove aria-disabled
and have just disabled
prop returned from there.
Same with the Switch.
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.
Thank you for pointing that out! 🙏 I’ve updated the code.
Please let me know if there are any further changes needed. 😊
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.
It appears that removing aria-disabled is causing CircleCI’s browser tests to fail. I suspect this might be an accessibility (a11y) issue. Do you think we should reintroduce aria-disabled alongside the disabled prop?
…ove 'aria-disabled'. Applied the same update to Switch component.
Changes -
[] I have followed (at least) the PR section of the contributing guide.