Switch: Completely remove aria-checked from switch, set id on input to be the same as label, replace brittle unit test with more precise e2e test#2455
Draft
austinoneil wants to merge 7 commits intotrimble-oss:mainfrom
Conversation
✅ Deploy Preview for moduswebcomponents ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
aria-checked from switch, set id on input to be the same as label, replace brittle unit test with more precise e2e testaria-checked from switch, set id on input to be the same as label, replace brittle unit test with more precise e2e test
coliff
requested changes
Apr 22, 2024
Member
There was a problem hiding this comment.
This will be great when it's finished - but it's not quite right yet.

- The label is not matching the id.
- When the switch is checked the input should have the
checkedattribute - id name should assigned automatically with something like
mwc_id_0_switch_inputlike do for text-inputs (<label for="mwc_id_0_text_input">Username</label>)
added 2 commits
April 26, 2024 16:19
Contributor
Author
I've fixed the other two issues. |
coliff
reviewed
May 6, 2024
Member
|
oh, found a bug. Clicking on the label should change the state like this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Completely remove
aria-checkedfrom switch, setidoninputto be the same aslabel, replace brittle unit test with more precise e2e testReferences #2450
Type of change
How Has This Been Tested?
https://deploy-preview-2455--moduswebcomponents.netlify.app/?path=/story/user-inputs-switch--medium
Checklist