-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Replaced focus state with focus-visible #20252
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
Replaced focus state with focus-visible #20252
Conversation
MariaHCD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this looks good to me!
Two things:
- I think your recording for web is for a different issue :)
- Let's also test that accessibility is not broken i.e. that navigating to the checkbox via the keyboard works as expected
|
Oops, my bad. Updated! Here is the recording of navigating the checkbox with keyboard (tab). I forgot to post it yesterday. Screen.Recording.2023-06-07.at.14.47.53.mov |
Reviewer Checklist
Screenshots/VideosWebweb.mp4Desktopdesktop.mp4 |
s77rt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
cc @MariaHCD
MariaHCD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/MariaHCD in version: 1.3.26-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.26-4 🚀
|
| box-shadow: none; | ||
| } | ||
| div[role="checkbox"]:focus-visible > div[data-checkbox], div[role="checkbox"]:focus[data-focusvisible-polyfill] > div[data-checkbox] { | ||
| border-color: #03D47C !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sure many will disagree with this change especially when this is using theme colors which are not controlled by our theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to bring it to slack to get a consensus? Or if we did already, please share the link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responded here: #18801 (comment)




Details
Replacing focus state of checkbox with CSS focus-visible to highlight the checkbox only when navigated by keyboard.
Fixed Issues
$ #18801
PROPOSAL: #18801 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Note: this is actually happening on web/desktop only
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Screen.Recording.2023-06-07.at.14.47.35.mov
Mobile Web - Chrome
Screen.Recording.2023-06-06.at.18.33.30.mov
Mobile Web - Safari
Screen.Recording.2023-06-06.at.18.34.16.mov
Desktop
Screen.Recording.2023-06-06.at.18.08.18.mov
iOS
Screen.Recording.2023-06-06.at.18.31.27.mov
Android
Screen.Recording.2023-06-06.at.18.32.31.mov