Skip to content

Accessibility

WCAG

Web Content Accessibility Guidelines. The standard most teams use for color contrast. AA requires 4.5:1 for body text, 3:1 for large text and UI components.

4.54:1AA 4.5:1 · Pass
Text gray118

Adjust the gray value. Body text needs 4.5:1 for AA; large text and UI components need 3:1.

APCA

Advanced Perceptual Contrast Algorithm. A newer contrast model that accounts for font size and weight. More nuanced than WCAG for real-world conditions. The two specs sometimes disagree.

WCAG 4.54:1 · PassAPCA Lc 71 · Fail

Same #757575 ink on white: WCAG stays 4.54:1 for both, while APCA distinguishes thin 14px from bold 24px.

Screen reader

Software that reads interface content aloud for blind or low-vision users. Navigates by DOM order, heading structure, and ARIA roles, not visual layout. VoiceOver on Mac and iOS, NVDA and JAWS on Windows are the most common.

Account settingsSaveSaved

Switch to screen reader view to see how assistive tech reads DOM roles and structure rather than pixels.

Tab order

The sequence keyboard focus moves through when pressing Tab. Should follow a logical reading order. Unexpected jumps are often caused by DOM and visual order being out of sync.

1Tab 1
2Tab 2
3Tab 3
Focus jumps out of visual order

Step with Press Tab. Reordering via CSS while leaving DOM order intact causes jarring focus jumps.

Prefers color scheme

A media query that detects the user’s system theme preference. The right way to honour dark mode without requiring a separate in-product setting.

System themedark
@media (prefers-color-scheme: dark)

Honoring prefers-color-scheme adapts the interface automatically to the user’s OS setting.

aria-label

An accessible name for an element with no visible text. Should describe the action, not the element type. Search, not icon.

Announced as“icon, button”

Name icon-only controls by the action they perform (“Search”), not the element type (“icon”).

Focus trap

Keeping keyboard focus inside an open modal or dialog. Without it, focus escapes to the page behind the overlay.

DOM order

The sequence of elements in the HTML. Screen readers follow this, not visual order. Reordering visually with CSS while leaving the DOM unchanged creates a disconnect between what is seen and what is read.

Semantic HTML

Using the right element for the job. A button handles keyboard events, focus, and role for free. A div styled as a button needs all of that added back manually.

Label association

Linking a label to its input via matching for and id attributes. Without it, clicking the label does not focus the field.

Color-only state

Using color as the sole signal for a state change. An error shown only by a red border is invisible to colorblind users. Always pair color with an icon or text.