Skip to content
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

fix(17525): fixes a11y violation in toggle #18216

Merged
merged 4 commits into from
Dec 11, 2024
Merged

fix(17525): fixes a11y violation in toggle #18216

merged 4 commits into from
Dec 11, 2024

Conversation

2nikhiltom
Copy link
Contributor

@2nikhiltom 2nikhiltom commented Dec 9, 2024

Closes #17525

This PR fixes Form control with "switch" role has no associated label violations and makes labels

  • Visible
  • Programmatically associated with the aria-labelledby
  • Usable by assistive technologies and voice commands
    More context in bug comments

Changelog

Changed

  • Replaced aria-label with aria-labelledby for programmatic label association
  • Removed aria-hidden attribute
  • Ensured all toggle switches have visible and associated labels

Testing / Reviewing

Open storybook, go to toggle story verify no a11y violations are present

@2nikhiltom 2nikhiltom requested a review from a team as a code owner December 9, 2024 12:28
Copy link

netlify bot commented Dec 9, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit e070530
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/6758ae0212e3420008a499f3
😎 Deploy Preview https://deploy-preview-18216--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 9, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit e070530
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6758ae02ef1de60008f47f70
😎 Deploy Preview https://deploy-preview-18216--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 9, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit e070530
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6758ae02edb1a60008bcb72d
😎 Deploy Preview https://deploy-preview-18216--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.16%. Comparing base (a022b9a) to head (e070530).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18216   +/-   ##
=======================================
  Coverage   84.16%   84.16%           
=======================================
  Files         404      404           
  Lines       14350    14350           
  Branches     4619     4619           
=======================================
  Hits        12077    12077           
  Misses       2111     2111           
  Partials      162      162           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

LGTM! I don't see the error anymore

@guidari guidari added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit e6ee8dd Dec 11, 2024
37 checks passed
@guidari guidari deleted the 17525_toggle_a11y branch December 11, 2024 17:20
Copy link
Contributor

The content of this pull request will be made available as part of our next release. For the full schedule of upcoming releases, check out our Release Radar page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility Issue - Switch Control Missing Associated Label
4 participants