Accessibility
Accessibility
VDL is designed to meet WCAG 2.1 AA contrast requirements across all three themes. This page documents contrast ratios, color blindness considerations, and reduced motion support.
Contrast Ratios
Navy Theme (Default)
| Combination | Foreground | Background | Ratio | Pass |
|---|---|---|---|---|
| Primary text on base | #F9FAFB on #0A0F1A | 16.8:1 | AAA | |
| Secondary text on base | #9CA3AF on #0A0F1A | 7.2:1 | AAA | |
| Tertiary text on base | #6B7280 on #0A0F1A | 4.5:1 | AA | |
| Brand on base | #6366F1 on #0A0F1A | 4.6:1 | AA | |
| Primary text on surface | #F9FAFB on #111827 | 14.1:1 | AAA | |
| Brand on surface | #6366F1 on #111827 | 3.8:1 | AA Large |
Light Theme
| Combination | Foreground | Background | Ratio | Pass |
|---|---|---|---|---|
| Primary text on base | #1C1917 on #FAF7F4 | 15.3:1 | AAA | |
| Secondary text on base | #57534E on #FAF7F4 | 5.8:1 | AA | |
| Tertiary text on base | #A8A29E on #FAF7F4 | 2.7:1 | Decorative only | |
| Brand on white | #6366F1 on #FFFFFF | 4.6:1 | AA | |
| Brand dark on white | #312E81 on #FFFFFF | 9.4:1 | AAA |
Status Colors
All status colors maintain AA contrast on their respective backgrounds:
| Status | On Dark (#0A0F1A) | On Light (#FAF7F4) |
|---|---|---|
Success #10B981 | 7.5:1 (AAA) | 3.0:1 (use with large text) |
Warning #F59E0B | 8.9:1 (AAA) | 2.6:1 (use badge/bg only) |
Error #EF4444 | 5.1:1 (AA) | 4.0:1 (AA Large) |
Info #6366F1 | 4.6:1 (AA) | 4.6:1 (AA) |
Light theme guideline: On light backgrounds, use status colors for solid fills (badges, icons) rather than standalone text. Use darker variants (-700, -900) for text on light.
Color Blindness
Design Principles
VDL never relies on color alone to convey information:
- Shape + Color: Status indicators pair color with icons (checkmark, exclamation, X)
- Text labels: All colored badges include text labels
- Pattern differentiation: Charts use distinct line styles alongside colors
Zone Color Distinction
The 5 zone colors are chosen for maximum perceptual distance:
| Zone | Hue | Deuteranopia | Protanopia | Tritanopia |
|---|---|---|---|---|
| Bastion (Indigo) | 277 | Blue | Blue | Blue-pink |
| Rempart (Violet) | 293 | Blue-purple | Blue | Pink |
| Citadel (Amber) | 70 | Yellow | Yellow-green | Pink-red |
| Brain (Cyan) | 215 | Blue-gray | Blue-gray | Blue |
| Glacis (Emerald) | 163 | Yellow-brown | Yellow | Blue-green |
Risk area: Amber and Emerald can be confused under deuteranopia/protanopia. Mitigation: these zones always include text labels and never appear side-by-side without additional differentiation (icon, position, or pattern).
Chart Palette
The 8-color chart palette prioritizes blue/orange separation (maximally distinct under most forms of color blindness):
#6366F1 → #8B5CF6 → #06B6D4 → #10B981 → #F59E0B → #EF4444 → #EC4899 → #F97316For critical data comparisons, pair colors from opposite ends of the palette (indigo + amber, violet + emerald).
Reduced Motion
VDL respects the prefers-reduced-motion: reduce media query.
What Changes
When reduced motion is active:
| Feature | Default | Reduced Motion |
|---|---|---|
| Page entrances | Fade + slide (400ms) | Instant |
| Staggered reveals | Sequential delay | All visible immediately |
| Spring pop | Scale overshoot | No animation |
| Glow pulse | Continuous pulsing | Static glow |
| Theme switch | Circular reveal | Instant swap |
| Shimmer loaders | Sweep animation | Static gradient |
Implementation
All VDL animations use centralized classes that include the media query override:
@media (prefers-reduced-motion: reduce) {
.vdl-animate-fade-in,
.vdl-animate-fade-in-up,
.vdl-animate-spring-pop,
/* ... all animation classes */ {
animation: none;
}
}No information is lost when animations are disabled. Elements appear in their final state.
Testing
To test reduced motion:
- macOS: System Settings → Accessibility → Display → Reduce motion
- Windows: Settings → Accessibility → Visual effects → Animation effects → Off
- Chrome DevTools: Rendering tab → Emulate CSS media →
prefers-reduced-motion: reduce
Focus Management
Focus Ring
All interactive elements use the VDL focus ring:
--vdl-shadow-focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.25);This provides a 3px indigo ring that is visible against both dark and light backgrounds. The ring uses box-shadow rather than outline for consistent rendering across browsers.
Keyboard Navigation
- Tab order follows visual layout (no
tabindex> 0) - Focus trapping in modals and dialogs
- Escape key closes overlays
- Arrow keys navigate within menus and lists
Screen Reader Considerations
- Logo SVGs include appropriate
alttext - Decorative elements use
aria-hidden="true" - Status messages use
role="status"orrole="alert" - Charts include
aria-labeldescriptions of data trends