fix: Improve focus style consistency - #92
Merged
Merged
Conversation
Improve consistency of focus styles in the app. Prefer `focus-visible` to avoid lingering focus styles for users interacting with a pointer.
These do not appear to have an impact as the `li` element is not focusable. The button child receives focus and has its own focus styles.
dcalhoun
commented
May 6, 2024
| return ( | ||
| <li | ||
| className={ cx( | ||
| 'flex flex-row min-w-[168px] h-8 hover:bg-[#ffffff0C] focus:bg-[#ffffff0C] rounded transition-all', |
Member
Author
There was a problem hiding this comment.
The focus styles applied to the li element did not appear to have an impact, as the element is not focusable. The child button is the element focused when moving focus with the keyboard, which has its own focus styles with an outline.
Member
Author
|
👋🏻 @SiobhyB I hope I provided clear explanation for my rationale in the descriptions, but please let me know if I could provide more context or if you have a different perspective on this subject. Thanks! 🙇🏻 |
dcalhoun
marked this pull request as ready for review
May 6, 2024 14:14
wojtekn
approved these changes
May 7, 2024
wojtekn
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the cleanup. The code change looks good, and the focus behavior seems better now.
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.
Proposed Changes
focus-visiblestyles overfocusableto satisfy prior design guidance.lielement.Testing Instructions
Verify keyboard focus styles
Verify pointer/cursor styles
pointer/cursor/keyboard.
before.mov
after.mov
Pre-merge Checklist