fix(a11y): add high-contrast focus-visible ring to custom select components#6125
Closed
hardik-bhalekar wants to merge 1 commit into
Closed
fix(a11y): add high-contrast focus-visible ring to custom select components#6125hardik-bhalekar wants to merge 1 commit into
hardik-bhalekar wants to merge 1 commit into
Conversation
…e:ring-purple-500 to custom select components
Contributor
|
@hardik-bhalekar is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
👋 Hey @hardik-bhalekar! Thanks for your contribution! 🎉 Unfortunately, this PR has been automatically closed because it is not linked to any open issue. To resolve this, please do the following:
We look forward to reviewing your PR once an issue is linked! 🚀 |
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
Adds visible keyboard-focus indicators to every custom
<select>element that previously relied on browser-default or invisible outlines, improving WCAG 2.1 §2.4.7 (Focus Visible) compliance.Problem
Several custom-styled
<select>elements across the dashboard and customization surfaces suppress the browser's native focus outline (outline-none) but do not provide an adequate replacement. This makes it impossible for keyboard-only or assistive-technology users to track which control currently has focus.Changes
app/customize/components/ThemeSelector.tsxfocus-visible:ring-2 focus-visible:ring-purple-500toStyledSelectcomponents/dashboard/CIAnalytics/CIFilters.tsxfocus:ring-2 focus:ring-cyan-500/30withfocus-visible:ring-2 focus-visible:ring-purple-500on both filter selectscomponents/dashboard/InactiveRepoReminder.tsxfocus-visible:ring-2 focus-visible:ring-purple-500to the inactivity filter selectWhy
focus-visibleinstead offocusfocus-visibleactivates only on keyboard navigation, not on mouse clicks, preserving the clean mouse-click UX while guaranteeing visibility for keyboard users. The purple ring (ring-purple-500) provides ≥ 3:1 contrast against both light and dark backgrounds per WCAG guidelines.Testing
npx tsc --noEmitpasses with zero errors