This repository was archived by the owner on Apr 26, 2024. It is now read-only.
fix: lang selector keyboard accessibility#2927
Merged
Merged
Conversation
Codecov ReportBase: 66.02% // Head: 66.99% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2927 +/- ##
==========================================
+ Coverage 66.02% 66.99% +0.96%
==========================================
Files 118 136 +18
Lines 1351 1533 +182
Branches 342 358 +16
==========================================
+ Hits 892 1027 +135
- Misses 422 464 +42
- Partials 37 42 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
nschonni
approved these changes
Oct 17, 2022
ovflowd
approved these changes
Oct 17, 2022
ovflowd
left a comment
Member
There was a problem hiding this comment.
Forgot to approve this one 🙈
✨
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The new language selector dropdown had a small bug in that if you tabbed through the selections with the keyboard it would automatically change the language to French as you tabbed away from the dropdown. This is not the expected behaviour.
I added a check to the event to make sure only
spaceandenterkeys could trigger a language change.I also added an aria-expanded attribute to the button so that screen reader users are made aware that the button has a popup and whether it is open or closed.
Related Issues
Check List
npm run lint:js -- --fixand/ornpm run lint:md -- --fixfor my JavaScript and/or Markdown changes.npm run testto check if all tests are passing, and/ornpm run test -- -uto update snapshots if I created and/or updated React Components.npm run buildwork fine.