Segmented Control

Alignment target:@astryxdesign/core v0.7.1 · SegmentedControl

Color contrast

Measure the foreground and background as they appear together on screen. The ratios below are the WCAG 2.2 AA checks for this component.

CheckRatioApplies toGuidance
Text label4.5:1Rest, Hover, Pointer down, Selected

Each label must have at least 4.5:1 contrast with its segment background. Check unselected, Hover, Pointer down, and selected colors as they appear on screen. For Hover and Pointer down, measure the final background after the overlay is applied.

1.4.3 Contrast (Minimum)

Essential icon3:1Icon only

When a segment has no visible label, its icon must have at least 3:1 contrast with the segment background. An icon beside a visible label does not need its own check.

1.4.11 Non-text Contrast

Selected state indicator3:1 if relied uponSelected

The selected background must reach 3:1 only when users need it to tell selected from unselected. Label color and weight also show selection.

1.4.11 Non-text Contrast

Visible control boundary3:1 if neededRest

The control edge or segment borders need at least 3:1 contrast when users need them to see the choices.

1.4.11 Non-text Contrast

Keyboard focus indicator3:1Focus visible

The focus outline must have at least 3:1 contrast with the area around the segment. Check it on the track and selected background.

1.4.11 Non-text Contrast

Disabled appearanceNot requiredDisabled

Disabled controls do not need to meet these contrast ratios.

1.4.3 and 1.4.11 exceptions

WCAG 1.4.3WCAG 1.4.11