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

Switch: Set aria-checked value to "true" and "false" #2450

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

austinoneil
Copy link
Contributor

@austinoneil austinoneil commented Apr 18, 2024

Description

Previous implementation was passing a boolean in as the attribute value. New implementation passes in a string.

References #2143

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Add e2e checks, update unit tests

https://deploy-preview-2450--moduswebcomponents.netlify.app/?path=/story/user-inputs-switch--medium

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Copy link

netlify bot commented Apr 18, 2024

Deploy Preview for moduswebcomponents ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2d9af10
🔍 Latest deploy log https://app.netlify.com/sites/moduswebcomponents/deploys/6620c300b0ba920008b23fe4
😎 Deploy Preview https://deploy-preview-2450--moduswebcomponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 27 (🟢 up 1 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@coliff coliff added bug Something is wrong and needs to be addressed accessibility labels Apr 18, 2024
@coliff
Copy link
Member

coliff commented Apr 19, 2024

This is an improvement so I'll get this merged - thanks!
Still things to fix with switches though:

  • Should really change aria-checked to just checked
  • labels should match ids set on the input
  • screen reader support is currently not working at all for this component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility bug Something is wrong and needs to be addressed modus-switch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants