-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor(toggle): make toggle labels accessible #2885
refactor(toggle): make toggle labels accessible #2885
Conversation
ff3c634
to
72905b4
Compare
Deploy preview for the-carbon-components ready! Built with commit 62654dc https://deploy-preview-2885--the-carbon-components.netlify.com |
Deploy preview for carbon-components-react ready! Built with commit 62654dc https://deploy-preview-2885--carbon-components-react.netlify.com |
Great that you started this effort @emyarod! Any explanation on why you chose to rip/replace the markup/style? |
@asudoh primarily to use proper markup for labeled toggles without breaking how the component appears. The current |
72905b4
to
2ed2a44
Compare
@emyarod Nice! I tested Vanilla (https://deploy-preview-2885--the-carbon-components.netlify.com/?nav=toggle) with JAWS & NVDA in Chrome & FF, and things sound good. I only noticed 1 problem: for the "Toggle with visible label", please delete the
|
@emyarod I have tested it on macOS & VO with the same results as @carmacleod and I agree with her comments. |
2ed2a44
to
c374b03
Compare
got it @carmacleod @snidersd! I've made those adjustments vanilla toggle and small toggle should be ready for code and visual review (and need design feedback on the visual changes and possible inline variant before continuing with the React version) |
Deploy preview for carbon-elements ready! Built with commit 62654dc |
c374b03
to
d0d3506
Compare
d0d3506
to
eda9c0f
Compare
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.
We still need the checkmark in the small toggle, it should not be deprecated. The spec in the issue that is referenced was from Oct and is out of date. Please reference most up to date specs: https://ibm.ent.box.com/file/334120810490
d64b1ca
to
0ecd064
Compare
Closes #2809
This PR refactors the toggle and small toggle components to have accessible labels.
question for reviewers: Do we want to wrap the component in a
div.toggle
? Do we also want to support an inline toggle?Changelog
New
Changed
Removed
Testing / Reviewing
Ensure the toggle and small toggle function and appear correctly