Repository navigation
fix(a11y): show one keyboard focus ring on every control - #378
Merged
Merged
Conversation
Keyboard testing found focus hard to follow (Zarestia-Dev#354): of 103 tab stops on seven screens, 50 showed only a faint state-layer tint and 21 showed nothing (icon buttons, panel headers, Material buttons, the file browser sidebar, the view tabs, selects). Every focusable control now shows the same :focus-visible ring, as libadwaita draws it: a 2px outline in the accent colour, inset so containers that clip their overflow keep it. Filled buttons and solid pills draw it in their label colour, which is readable on the fill. Text fields keep their own focus style and menu items their highlight. Pills drop their separate 40% inset ring for this one.
Hakanbaban53
approved these changes
Nov 25, 2026
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.
Part of #354, following the keyboard testing there: focus indicators were missing or hard to see on some elements.
What
I measured it first: Tab through seven screens (home, Quick Add Remote, Preferences, About, file browser, Flow, remote detail) and compare each tab stop's screenshot focused vs. not focused. On master, of 103 stops, 50 showed only a faint tint (Material's focus state layer) and 21 showed nothing: icon buttons, expansion panel headers, Material text buttons, the file browser sidebar, the view tabs in the title bar, Preferences' selects. Pills and some plain buttons had a ring.
Now every focusable control shows the same
:focus-visiblering, as libadwaita draws it::focus-visible), so mouse clicks look as before;It's one rule in
custom-theme.scsswith--focus-ring-colorand--focus-ring-width, so the look is easy to adjust.Tests
ng buildpass. There's no unit test: jsdom can't evaluate:focus-visibleor render outlines.