Accessibility

Last updated on 2026-05-31

The Trading Dashboard Kit is built with WCAG AA accessibility as a baseline. Every component and page meets or exceeds these standards, using semantic HTML, ARIA attributes, and accessible interaction patterns throughout all 39 screens.

Every page includes a skip-to-content link as the first focusable element:

import { SkipLink } from "@/components/layout/skip-link"

<SkipLink />

The skip link is visually hidden until focused. It jumps the user directly to the #main-content landmark, bypassing the trading sidebar and header navigation.

Color Contrast

All text meets WCAG AA contrast ratios:

  • Normal text (< 18px): minimum 4.5:1 contrast ratio
  • Large text (>= 18px bold or >= 24px): minimum 3:1 contrast ratio
  • UI components and states: minimum 3:1 against adjacent colors

The oklch color token system ensures contrast is maintained in both light and dark mode. The teal theme (hue 160) was specifically tuned so that primary-on-background and foreground-on-muted combinations pass AA thresholds.

Keyboard Navigation

All interactive elements are keyboard accessible:

  • Tab -- navigate between focusable elements in logical order
  • Shift+Tab -- navigate backwards
  • Enter/Space -- activate buttons, links, and toggles
  • Arrow keys -- navigate within menus, radio groups, tabs, and select dropdowns
  • Escape -- close dialogs, sheets, popovers, and the command palette

Focus Indicators

Visible focus rings appear on all interactive elements using the --ring design token:

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

Focus Traps

Focus is trapped inside overlay components to prevent keyboard users from tabbing behind them:

  • Dialog -- add symbol dialog, order confirmation, API key creation, 2FA setup
  • Sheet -- mobile sidebar navigation
  • Command -- global search command palette (Cmd+K)

When these components close, focus returns to the trigger element that opened them.

Screen Reader Support

Semantic HTML

All pages use proper HTML5 landmarks:

  • <header> for the app header
  • <nav> with aria-label for sidebar navigation, mobile navigation, and tab groups
  • <main> for primary content area
  • <aside> for the sidebar
  • <section> with aria-label for dashboard widgets, chart sections, and form groups
  • <time> with datetime attribute for trade timestamps, notification dates, and earnings dates

ARIA Labels

Icon-only buttons include descriptive labels:

<Button aria-label="Search stocks">
  <Search className="size-4" />
</Button>

<Button aria-label="Switch to dark mode">
  <Moon className="size-5" />
</Button>

Live Regions

The LiveRegion component announces dynamic content changes to screen readers:

import { LiveRegion } from "@/components/a11y/live-region"

<LiveRegion message="Order placed successfully" politeness="polite" />

Live regions are used for order confirmations, price alert triggers, watchlist updates, and trade execution notifications.

Heading Hierarchy

Every page follows a strict heading hierarchy:

  • One <h1> per page (the page title)
  • <h2> for major sections
  • <h3> for subsections within those sections
  • No skipped heading levels

For example, the dashboard uses <h1> for "Dashboard", <h2> for "Portfolio Value", "Watchlist", and "Activity Feed" sections, and <h3> within each section as needed.

Touch Targets

All interactive elements meet the 44x44px minimum touch target size. The kit includes a .touch-target utility class:

.touch-target {
  min-width: 44px;
  min-height: 44px;
}

This class is applied to icon buttons in the app header (search, notifications, user menu), sidebar navigation items, watchlist action buttons, order form controls, and tab triggers on mobile.

Reduced Motion

The kit respects the prefers-reduced-motion media query. When enabled:

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

This disables all animations including chart entrance animations, card stagger animations, sidebar collapse/expand transitions, notification slide-ins, shimmer loading states, hover transforms on stock cards, and the market strip scrolling effect.

Status Indicators

Status information is never conveyed by color alone. The kit uses color plus icon plus text:

{/* Price change uses icon + text + color */}
<TrendingUp className="size-3 text-chart-1" />
<span className="text-chart-1">+2.45%</span>

{/* Negative P&L uses icon + text + color */}
<TrendingDown className="size-3 text-destructive" />
<span className="text-destructive">-$1,234.56</span>

Order side badges use both color and text: "Buy" (green badge) and "Sell" (red badge). Signal strength indicators use icon size and text label alongside the color. The StatCard component shows trend arrows alongside percentage values to ensure changes are perceivable without color.

Data Table Accessibility

Data tables across the kit follow accessibility best practices:

  • Tables use proper <thead>, <tbody>, <th>, and <td> elements
  • Column headers have scope="col" attributes
  • Sortable columns use aria-sort="ascending" or aria-sort="descending" to announce sort state
  • The holdings table, trade history table, screener table, positions table, and options chain table all follow this pattern

Form Accessibility

Forms across the kit follow accessibility best practices:

  • Labels associated with inputs via htmlFor/id
  • Error messages linked with aria-describedby
  • Required fields marked with visual indicators and aria-required
  • Invalid fields marked with aria-invalid for screen reader announcement
  • The order entry form, profile form, login form, register form, and add symbol dialog all follow these patterns

Testing Recommendations

Tool Purpose
axe DevTools Automated accessibility scanning
VoiceOver (macOS) Screen reader testing
NVDA (Windows) Screen reader testing
Keyboard-only navigation Tab through every page
Lighthouse Accessibility audit score

Need a professional accessibility review? Try our free WCAG compliance checker to scan any URL for accessibility issues.