Ensure Checkbox has a visible ring on focus-visible
#818
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.
There has been a little defect kicking around for...well, kind of forever. The
Checkbox
component lacked a visible focus ring when focused by keyboard navigation (focus-visible
).In laying out a potential new user-preferences UI, this accessibility shortcoming is feeling more glaring. The fix required me to do a little Tailwind-thinking but ended up being straightforward (i.e. can be done via CSS alone; I thought we might have to track/manage focus state for a while there...).
Testing
On this branch, navigating with the keyboard through/around checkboxes on the Checkboxes component page in the pattern library will cause focus rings to show up:
On
main
,Checkbox
es do not have any focus rings.Fixes #627