fix(accessibility): add visible focus-visible outlines on ApiDetailPage interactive elements - #792
Merged
greatest0fallt1me merged 1 commit intoJul 28, 2026
Conversation
…ge interactive elements Consolidate all ApiDetailPage focus-visible rules inside the @layer focus cascade layer for consistent ring appearance. Move the global catch-all (api-detail-page *:focus-visible) into the layer so it participates in the same cascade as component-level overrides, fixing inconsistent 4px vs 3px offset. Add comprehensive CSS contract tests (focus-layer.test.ts) verifying every interactive element class in ApiDetailPage has a corresponding :focus-visible rule using the accent token. Add component tests (ApiDetailPage.test.tsx) verifying all interactive buttons, form controls, tabs, and dialogs are keyboard-focusable and carry no inline outline:none. Closes CalloraOrg#719
Contributor
|
Merged into main via admin resolver (-X theirs). |
Contributor
|
LGTM 🎉 merging now. Great job! |
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.
Overview
This PR adds visible keyboard-only focus-visible outlines on every interactive element in ApiDetailPage by consolidating all rules inside the
@layer focuscascade layer for consistent ring appearance. The global catch-all (.api-detail-page *:focus-visible) is moved into the layer so it participates in the same cascade as component-level overrides, fixing inconsistent 4px vs 3px offset.Related Issue
Closes #719
Changes
🎯 Focus CSS Consolidation
src/styles/focus.css.api-detail-page *:focus-visibleand.marketplace-page *:focus-visibleglobal catch-all rules inside the@layer focuscascade layer.api-usage-pagefocus-visible overrides inside the@layer focusblock🔍 ApiDetailPage Missing Import Fix
src/pages/ApiDetailPage.tsxStatusBadgeandapiStatusToVariantfrom../components/StatusBadge(component was using these without importing them)🧪 Comprehensive Focus Tests
[ADD]
src/focus-layer.test.ts— 11 new CSS contract tests verifying::focus-visiblerule (primary, secondary, ghost, icon):focus-visiblerule (range, select, text input, checkbox):focus-visiblerules (links, breadcrumb, tabs, TOC):focus-visiblerules@layer focusoutline:noneoverrides in the component[ADD]
src/pages/ApiDetailPage.test.tsx— 9 new component-level tests verifying:outline:none🐛 LiveRegion Fix
src/components/LiveRegion.tsxVerification Results
:focus-visibleoutline@layer focus--accent) with WCAG 2.1 AA contrast2px solid var(--accent)#4e85ffdark /#2563eblight)outline-offsetthat works at all viewport sizesoutline:nonesuppresses the ringTimeline
Made with Cursor