Task 20: Accessibility audit improvements
Semantic HTML:
- Changed Card component from div to article element
- Added id="main-content" to main element for skip link target
Keyboard Navigation & ARIA:
- Added skip link to TopBar (visible only on focus, navigates to #main-content)
- Added aria-label="Active session information" to session info container
- Added aria-hidden="true" to all decorative colored dots (CardHeader, CareerActivity, Projects, Sidebar status badge)
- All expandable items already have role="button", tabIndex={0}, aria-expanded
- All KPI cards already have proper aria-label describing flip state
- Command palette already has full ARIA implementation (combobox, listbox, dialog)
Focus Management:
- Added global focus-visible styles in index.css (2px accent outline, 2px offset)
- Buttons, links, inputs all have proper focus rings with accent color
- Command palette focus trap already implemented
Reduced Motion:
- All components already check prefers-reduced-motion at module scope
- Dashboard entrance, tile expansion, KPI flip, palette animations respect reduced motion
- Added reduced motion override for pulse animation (disables pulse, keeps static dot)
Color Contrast:
- All color tokens already meet WCAG AA standards per ref spec
- Tertiary text (#8DA8A5) used only for supplementary labels where information is conveyed elsewhere
Quality checks: typecheck ✓, lint ✓ (1 pre-existing warning), build ✓
This commit is contained in:
@@ -371,3 +371,39 @@ html {
|
||||
to { transform: none; opacity: 1; }
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== FOCUS VISIBLE STYLES (WCAG Compliance) ===== */
|
||||
/* Default focus ring for all focusable elements */
|
||||
*:focus-visible {
|
||||
outline: 2px solid rgba(13, 110, 110, 0.4);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Button-like interactive elements */
|
||||
button:focus-visible,
|
||||
[role="button"]:focus-visible,
|
||||
[role="option"]:focus-visible {
|
||||
outline: 2px solid rgba(13, 110, 110, 0.4);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a:focus-visible {
|
||||
outline: 2px solid rgba(13, 110, 110, 0.4);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Inputs and textareas */
|
||||
input:focus-visible,
|
||||
textarea:focus-visible {
|
||||
outline: 2px solid rgba(13, 110, 110, 0.6);
|
||||
outline-offset: 0px;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
/* Disable pulse animation on status badge dot */
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 1; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user