Repository navigation
a11y: redirect focus ring from checkbox to full chip - #18
Open
ashishbhateja wants to merge 1 commit into
Open
ashishbhateja wants to merge 1 commit into
ashishbhateja wants to merge 1 commit into
Conversation
Keyboard users who tab through the interest chips saw the focus indicator only on the tiny browser-default checkbox, making it easy to miss where focus was. The chip already uses :has(input:checked) to style the full label on selection; this extends the same pattern to :has(input:focus-visible) so the 3px focus outline appears on the entire chip. The checkbox's own outline is suppressed to avoid a double ring. Advances #5.
This branch has not been deployed
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.
What this changes
Adds two CSS rules to
src/reader/reader.cssso that when a keyboard user focuses an interest chip, the 3 px focus outline appears around the entire chip label rather than only around the tiny browser-default checkbox inside it.The chip already uses
:has(input:checked)to style the full label on selection; this extends that same pattern to:focus-visible.Why
Closes #5 (partial). The interest chips are the main interactive element on the reader for personalising recommendations. With only the checkbox receiving the focus ring, keyboard-only users had to hunt for a small, easily missed indicator — especially in the dark or high-contrast themes where the default browser checkbox outline can blend into the background. The fix makes the focus state as prominent as the selected state.
Checklist
node scripts/smoke.mjspasses (19 checks)Generated by Claude Code