Repository navigation
Conversation
The controller moves the focus by script, and once the mouse has clicked anywhere Chromium stops drawing :focus-visible for that. On the keyboard the D-pad then moved from key to key with none of them lit, so it looked as if the pad no longer reached it. The shell now marks data-input="pad" while the pad is in use (any button or stick past the deadzone) and drops it on a click or a physical key. Every :focus-visible rule of the shell and the design tokens has a twin for :focus under that mark, so whatever the pad focuses is drawn: the keys, the suggestions, the toolbar, the tabs and the menus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Stacked on #106.
Summary
Reproduced: after one mouse click (the + button, for example), the D-pad still moved the focus on the controller keyboard (q → w), but
:focus-visiblewas false. The selected key stayed grey like the others, so the pad looked as if it no longer reached the keyboard. Chromium stops drawing focus moved by script once the user has used the pointer, and the pad moves focus by script.gamepad.tssetsdata-input="pad"on the shell's root whenever a button is pressed or a stick moves past the deadzone. Apointerdownorkeydownremoves it.:focus-visiblerule inshell.cssandtokens.cssgets a twin:root[data-input="pad"] …:focus. That covers the keys, the suggestions, the toolbar, the tabs and the menu.tabindex="-1", so the keyboard dialog, which takes focus only to be announced, gets no outline around the whole window.Test plan
npm run typechecknpm test(118 passed)npm run test:e2e(63 passed, 3 skipped), including axe on the shell. New regression test: mouse click on +, then D-pad right twice, and the focused key is lit both times. Before the fix it stayed grey.🤖 Generated with Claude Code