Sitelet https://github.com/carbon-design-system/carbon-components-react/pull/1771
Skip to content
This repository was archived by the owner on Oct 19, 2021. It is now read-only.

fix(a11y): avoid empty label in ToggleSmall - #1771

Merged
asudoh merged 3 commits into
carbon-design-system:masterfrom
asudoh:toggle-small-assistive-text
Jan 25, 2019
Merged

asudoh merged 3 commits into
carbon-design-system:masterfrom
asudoh:toggle-small-assistive-text

Conversation

@asudoh

@asudoh asudoh commented Jan 20, 2019

Copy link
Copy Markdown
Contributor

Fixes #1183.

Changelog

New

  • Invisible <span> in <ToggleSmall>'s <label> for assistive technologies.

@netlify

netlify Bot commented Jan 20, 2019 •

Copy link
Copy Markdown

Deploy preview for carbon-components-react ready!

Built with commit 45138a5

https://deploy-preview-1771--carbon-components-react.netlify.com

@emyarod emyarod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the original reporter stated that the label needs to be before the input, is that still the case?

@lovemecomputer

lovemecomputer commented Jan 21, 2019 •

Copy link
Copy Markdown
Contributor

was going to say the same thing. not sure if valuable to merge in this fix in now as one PR, then refactor the label>input order later?
edit: tho i suppose that wouldn't make much different since the label isn't visible anyway!

@asudoh

asudoh commented Jan 22, 2019

Copy link
Copy Markdown
Contributor Author

Good catch @emyarod! Some research suggested that the order is for screen magnifier: https://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html, and as @lovemecomputer pointed out, it doesn't seem to affect our small toggle. CC @dakahn

@dakahn dakahn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. checked with DAP in latest chrome and the August 2018 ruleset

@asudoh

asudoh commented Jan 24, 2019

Copy link
Copy Markdown
Contributor Author

Great news - Thanks alot @dakahn for testing!

@lovemecomputer lovemecomputer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@asudoh
asudoh merged commit 45972b4 into carbon-design-system:master Jan 25, 2019
@asudoh
asudoh deleted the toggle-small-assistive-text branch January 25, 2019 05:01
@carbon-bot

Copy link
Copy Markdown

🎉 This PR is included in version 6.81.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gdelory

gdelory commented Jan 25, 2019

Copy link
Copy Markdown

Hi, not sure if that's expected, but for me it's not invisible at all :)

image

@emyarod

emyarod commented Jan 25, 2019

Copy link
Copy Markdown
Member

@gdelory would you be able to provide a Code Sandbox showcasing the issue you are facing?

@gdelory

gdelory commented Jan 28, 2019

Copy link
Copy Markdown

@emyarod Please ignore this, I just double checked and I was including manually an older version of carbon-components.css (9.1 something). All my apologies for this. All looks perfect now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants