Vauban Docs
Design System

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

CombinationForegroundBackgroundRatioPass
Primary text on base#F9FAFB on #0A0F1A16.8:1AAA
Secondary text on base#9CA3AF on #0A0F1A7.2:1AAA
Tertiary text on base#6B7280 on #0A0F1A4.5:1AA
Brand on base#6366F1 on #0A0F1A4.6:1AA
Primary text on surface#F9FAFB on #11182714.1:1AAA
Brand on surface#6366F1 on #1118273.8:1AA Large

Light Theme

CombinationForegroundBackgroundRatioPass
Primary text on base#1C1917 on #FAF7F415.3:1AAA
Secondary text on base#57534E on #FAF7F45.8:1AA
Tertiary text on base#A8A29E on #FAF7F42.7:1Decorative only
Brand on white#6366F1 on #FFFFFF4.6:1AA
Brand dark on white#312E81 on #FFFFFF9.4:1AAA

Status Colors

All status colors maintain AA contrast on their respective backgrounds:

StatusOn Dark (#0A0F1A)On Light (#FAF7F4)
Success #10B9817.5:1 (AAA)3.0:1 (use with large text)
Warning #F59E0B8.9:1 (AAA)2.6:1 (use badge/bg only)
Error #EF44445.1:1 (AA)4.0:1 (AA Large)
Info #6366F14.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:

  1. Shape + Color: Status indicators pair color with icons (checkmark, exclamation, X)
  2. Text labels: All colored badges include text labels
  3. Pattern differentiation: Charts use distinct line styles alongside colors

Zone Color Distinction

The 5 zone colors are chosen for maximum perceptual distance:

ZoneHueDeuteranopiaProtanopiaTritanopia
Bastion (Indigo)277BlueBlueBlue-pink
Rempart (Violet)293Blue-purpleBluePink
Citadel (Amber)70YellowYellow-greenPink-red
Brain (Cyan)215Blue-grayBlue-grayBlue
Glacis (Emerald)163Yellow-brownYellowBlue-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 → #F97316

For 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:

FeatureDefaultReduced Motion
Page entrancesFade + slide (400ms)Instant
Staggered revealsSequential delayAll visible immediately
Spring popScale overshootNo animation
Glow pulseContinuous pulsingStatic glow
Theme switchCircular revealInstant swap
Shimmer loadersSweep animationStatic 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 alt text
  • Decorative elements use aria-hidden="true"
  • Status messages use role="status" or role="alert"
  • Charts include aria-label descriptions of data trends