fix(#3605): use :focus-visible across interactive components#3911
Open
twjeffery wants to merge 1 commit into
Open
fix(#3605): use :focus-visible across interactive components#3911twjeffery wants to merge 1 commit into
twjeffery wants to merge 1 commit into
Conversation
|
Preview links
Built from commit eb22356. Previews are removed automatically when this PR closes. |
3 tasks
891a4fc to
3053966
Compare
3053966 to
eb22356
Compare
ArakTaiRoth
reviewed
May 8, 2026
| <goa-text as="h2" mt="0" mb="xs">7. Link — <code>::slotted(a:focus-visible)</code></goa-text> | ||
| <goa-text mb="s"> | ||
| Ring is now on the slotted anchor directly (reliable across shadow DOM). | ||
| <strong>Trade-off:</strong> ring wraps the anchor text only, not the icons. |
Collaborator
There was a problem hiding this comment.
You point this out here, and it is true, focus on a link with trailing or leading icons, the focus border only goes around the text, not the icons. Do we want that?
If we don't, a possible solution could be to use the focusin event for the Link, and set a variable if it's triggered, then set a class on the outer container if that variable is true. And finally set the border based on that class.
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.
Fixes #3605
Replaces #3861 (auto-closed when the branch was renamed.)
Before
Mouse click on interactive components left the focus ring visible for mouse users. In some cases the ring rendered without the designed gap/offset because
:focusfired on the mouse path alongside:focus-visible.After
Mouse click no longer shows the focus ring. Keyboard Tab and arrow-key navigation show the ring with the correct gap/offset. V1 and V2 paths both behave correctly.
Components updated
Make sure that you've checked the boxes below before you submit the PR
Steps needed to test
npm run serve:prs:react(or:angularor:web)./bugs/3605(React/Angular) or/issues/3605(Web).:active) should still show the pressed/focused state on buttons.Screen.Recording.2026-04-21.at.7.15.30.PM.mov
Screen.Recording.2026-04-21.at.7.17.35.PM.mov