fix(dockview-core): use :focus-visible for keyboard focus indicators#1373
Merged
Conversation
The tab and paneview focus rings were keyed on `:focus` / `:focus-within`, so they also showed on mouse click — visual noise that reads as a defect. Switch the indicator rules to `:focus-visible` (keyboard-only), keeping the descendant case via `:has(:focus-visible)` (e.g. a keyboard-focused close button still rings its tab). The inline tab-rename input keeps `:focus` (inputs should always ring) and the group content container keeps its `outline: none`. WCAG 2.4.7 / 1.4.11. Closes #1372. Co-Authored-By: Claude Opus 4.8 (1M context) <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.



Closes #1372.
Summary
Tab and paneview focus rings were keyed on
:focus/:focus-within, so they appeared on mouse click too — visual noise often read as a defect. This switches the indicator rules to:focus-visible(keyboard-only).defaultTab.scss—.dv-tab:focus-visible, .dv-tab:has(:focus-visible)(the:haskeeps the descendant case the old:focus-withincovered — e.g. a keyboard-focused close button still rings its tab).paneview.scss— pane header + body, same treatment.<input>keeps:focus(inputs should always ring); the group content container keepsoutline: none(it only ever takes programmatic focus).:focus-visibleand:has()are supported across all evergreen browsers. SCSS compiles clean (only the pre-existing@importdeprecation remains).Verification
Manual / visual (CSS-only; not unit-testable):
Context: one of the theme-dependent items from the accessibility conformance review (WCAG 2.4.7 / 1.4.11). Targets
v8-branchfor consistency with the active a11y work; cherry-pickable tomasteras a v7 patch.🤖 Generated with Claude Code