Repository navigation
fix(core): keep :focus-visible outlines on coarse-pointer devices - #4349
Merged
Merged
Conversation
bhamodi
requested review from
cixzhang,
ejhammond and
imdreamrunner
as code owners
July 26, 2026 04:19
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
July 26, 2026 04:19
Contributor
PR Analysis ReportNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: 69 accessibility violation(s) found — 4 critical, 58 serious, 6 moderate, 1 minor. AppShell - 1 issue(s)
Avatar - 1 issue(s)
AvatarGroup - 1 issue(s)
Badge - 1 issue(s)
Banner - 1 issue(s)
Card - 1 issue(s)
Carousel - 1 issue(s)
Chat - 1 issue(s)
ChatComposer - 1 issue(s)
ChatComposerInput - 2 issue(s)
ChatLayout - 1 issue(s)
ChatReasoning - 1 issue(s)
ChatToolCalls - 1 issue(s)
CheckboxList - 1 issue(s)
ClickableCard - 1 issue(s)
CodeEditor - 2 issue(s)
CodeEditorPerf - 2 issue(s)
CodeEditorTheme - 1 issue(s)
CodeTheme - 1 issue(s)
Collapsible - 1 issue(s)
DateRangeInput - 1 issue(s)
FileInput - 3 issue(s)
Grid - 1 issue(s)
GridMasonry - 1 issue(s)
Heading - 1 issue(s)
Icon - 1 issue(s)
InputGroup - 1 issue(s)
Item - 1 issue(s)
Kbd - 1 issue(s)
Layout - 2 issue(s)
List - 1 issue(s)
LogStream - 1 issue(s)
Markdown - 1 issue(s)
Outline - 1 issue(s)
OverflowList - 1 issue(s)
Overlay - 1 issue(s)
Pagination - 1 issue(s)
PowerSearch - 1 issue(s)
ProgressBar - 1 issue(s)
RadioList - 1 issue(s)
RichTextEditor - 1 issue(s)
Schedule - 1 issue(s)
Section - 1 issue(s)
SegmentedControl - 1 issue(s)
SelectableCard - 1 issue(s)
Stack - 1 issue(s)
Stepper - 1 issue(s)
TabList - 1 issue(s)
Table - 1 issue(s)
TableGroupedRows - 2 issue(s)
TablePagination - 1 issue(s)
TableRowStatus - 1 issue(s)
TableTree - 1 issue(s)
Text - 1 issue(s)
Theme - 1 issue(s)
PopArt - 1 issue(s)
Thumbnail - 1 issue(s)
Timestamp - 1 issue(s)
Token - 1 issue(s)
Tokenizer - 1 issue(s)
Toolbar - 1 issue(s)
ToolbarEdgeCompensation - 1 issue(s)
Generated by PR Enrichment workflow | View full report |
This was referenced Jul 27, 2026
cixzhang
approved these changes
Jul 27, 2026
cixzhang
enabled auto-merge (squash)
July 27, 2026 23:28
This branch was successfully 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.
Summary
Fixes a WCAG 2.4.7 (Focus Visible, Level AA) violation found in a11y scan #3:
reset.csscontained a rule that blanket-suppressed focus indicators on coarse-pointer devices::focus-visibleonly matches keyboard-style focus in the first place, so this rule didn't just hide incidental tap rings -- it removed the AA-required focus indicator for every keyboard user on a coarse-pointer device: iPad/phone + Bluetooth keyboard, and switch-control users.The rule was introduced in the shell hardening batch (#657) to avoid focus rings flashing on tap, on
showModal()auto-focus, and on programmatic focus. Browser:focus-visibleheuristics already handle the tap case (pointer interactions don't match:focus-visiblefor non-text-input elements), so removing the rule is the correct fix rather than rescoping it -- scoping suppression to:focus:not(:focus-visible)would be a no-op since browsers only draw default outlines for:focus-visiblefocus.Changes
packages/core/src/reset.css-- removed the "Touch Devices" section (the@media (hover: none) and (pointer: coarse):focus-visibleoutline suppression). The file header did not describe this behavior, so no header update was needed.packages/core/src/reset.test.ts-- new colocated test (same source-text assertion approach as the existing reset.css checks intheme/onMediaTokens.test.tsandAspectRatio/AspectRatio.test.tsx). It parses rule blocks out of reset.css and asserts no:focus-visiblerule zeroes out the outline, plus a sanity check that block parsing keeps working..changeset/a11y-reset-focus-visible.md-- patch changeset for@astryxdesign/core.Test plan
node_modules/.bin/vitest run packages/core/src/reset.test.ts-- verified the new WCAG assertion fails against the unfixed reset.css (caughtoutline: noneinside the coarse-pointer media block) and passes after the fix (2 passed).node_modules/.bin/vitest run packages/core --reporter=dot-- full core suite: 223 files / 5160 tests passed. (A first run had 2 unrelated flaky failures -- Typeahead paste test and one other known-flaky test; a clean rerun passed everything.)tsc --project tsconfig.json --noEmitinpackages/core-- clean.eslintonreset.test.ts-- clean.prettier --checkonreset.test.tsand the changeset -- clean.reset.cssitself has pre-existing formatting drift onmain(unrelated to this deletion-only change); left untouched to keep the diff scoped.node scripts/check-changesets.mjs-- 45 changesets valid.Notes