Fix focus contrast ratios for accessibility compliance (WCAG 2.1 AA) #25832
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.
This PR addresses accessibility issues with focus indicators on the ONNX Runtime website documentation where contrast ratios were insufficient for keyboard navigation users. The accessibility audit revealed that focus states for key navigation elements like "Learn more about ONNX Runtime & Generative AI", "Quickstart", "Tutorials", "Install ONNX Runtime", and "Hardware Acceleration" had contrast ratios as low as 1.152:1, well below the WCAG 2.1 AA requirement of 3:1 for UI components.
Changes Made
1. Enhanced List Group Item Focus Contrast
color: #555onbackground-color: #f5f5f5(6.8:1 ratio)color: #333onbackground-color: #f5f5f5(11.6:1 ratio)2. Improved Info List Group Item Focus Contrast
color: #31708fonbackground-color: #c4e3f3(4.1:1 ratio)color: #1e4a5fonbackground-color: #c4e3f3(7.1:1 ratio)3. Added Visible Focus Indicators for Form Inputs
Previously, search and filter inputs only removed the default outline (
outline: 0) without providing alternative focus indicators, making them inaccessible to keyboard users.border: 2px solid #0050C5andbackground-color: #f8f9faon focusAccessibility Compliance
All changes now exceed WCAG 2.1 AA standards:
Impact
Files Modified
csharp/ApiDocs/_exported_templates/default/styles/docfx.css- Enhanced input focus indicatorscsharp/ApiDocs/_exported_templates/default/styles/docfx.vendor.css- Improved text contrast ratiosFixes #24995.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.