Icon Button
Alignment target:@astryxdesign/core v0.7.1 · IconButton
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.
| Check | Ratio | Applies to | Guidance |
|---|---|---|---|
| Essential icon or spinner arc | 3:1 | Rest, Hover, Pointer down, Loading | IconButton has no visible label. Its icon must have at least 3:1 contrast with the button background in Rest, Hover, and Pointer down. The moving spinner arc must also meet 3:1 while loading. 1.4.11 Non-text Contrast |
| Visible control boundary | 3:1 if needed | Rest | The button edge needs 3:1 contrast only when users need it to see the control. 1.4.11 Non-text Contrast |
| Keyboard focus indicator | 3:1 | Focus visible | The focus outline must have at least 3:1 contrast with the area around the button. Check the red outline on destructive buttons too. 1.4.11 Non-text Contrast |
| Disabled appearance | Not required | Disabled | Disabled controls do not need to meet these contrast ratios. 1.4.3 and 1.4.11 exceptions |