Accessibility Checklists
Accessible Button Checklist (WCAG)
Every Button rule that WCAG 2.2, WAI-ARIA or the APG backs, in one checklist, with the success criteria behind each rule and their level.
Here's every rule for the Button that WCAG 2.2, WAI-ARIA or the APG backs, in one list you can work through when you build or review one. Each row names the WCAG 2.2 success criteria behind its rule, with their level, and links to the rule's table on its layer's page, where we explain why it's there. A rule that rests on WAI-ARIA or the APG alone says "None".
We build this list from the Button's checklists, so it always matches them. It leaves out the rules that rest only on HTML and the ones that are our own, so you'll find every rule in the Button's checklist.
UI rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
button/intent-colors | Must | Colours describe the action's intent rather than a hue, and never carry that meaning on their own | 1.4.1 Use of Color (A) | WCAG 1.4.1 (A), Open Components |
button/contrast | Must | The label has a contrast of 4.5:1 at rest, on hover and when pressed, in every variant, and the focus ring has 3:1 against the page | 1.4.3 Contrast (Minimum) (AA), 1.4.11 Non-text Contrast (AA) | WCAG 1.4.3, 1.4.11 (AA) |
button/link-underlined | Must | The link variant is underlined at rest, so it doesn't rely on colour alone to stand out from the text around it | 1.4.1 Use of Color (A) | Open Components, beyond WCAG 1.4.1 (A) |
button/focus-visible | Must | Keyboard focus shows an outline at least 2px thick, offset from the button, on :focus-visible | 2.4.7 Focus Visible (AA), 2.4.13 Focus Appearance (AAA) | WCAG 2.4.7 (AA), 2.4.13 (AAA) |
button/target-size | Must | The button is at least 24 × 24px, unless it's a link inside a sentence, with a 44 × 44px hit area on touch screens | 2.5.8 Target Size (Minimum) (AA), 2.5.5 Target Size (Enhanced) (AAA) | WCAG 2.5.8 (AA), 2.5.5 (AAA) |
button/resizable | Must | The button is sized with min-height and padding in rem, and its label wraps instead of being clipped or truncated | 1.4.4 Resize Text (AA), 1.4.10 Reflow (AA), 1.4.12 Text Spacing (AA) | Open Components, beyond WCAG 1.4.4, 1.4.10, 1.4.12 (AA) |
button/reduced-motion | Must | Nothing turns or slides when prefers-reduced-motion: reduce is set | 2.3.3 Animation from Interactions (AAA) | WCAG 2.3.3 (AAA) |
UX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
button/native-element | Must | It's a native <button>, or an <a href> for navigation, but never a <div> or a <span> | 2.1.1 Keyboard (A), 4.1.2 Name, Role, Value (A) | Open Components, beyond WCAG 2.1.1, 4.1.2 (A) |
button/accessible-name | Must | Every button has a name, and an icon-only button has a visually hidden label | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A), Open Components |
button/label-in-name | Must | An aria-label or aria-labelledby includes the visible label, ideally at the start | 2.5.3 Label in Name (A) | WCAG 2.5.3 (A) |
button/decorative-icons | Must | Icons are hidden from assistive technologies with aria-hidden, so they don't add to the button's name | 1.1.1 Non-text Content (A) | WCAG 1.1.1 (A) |
button/keyboard | Must | Enter and Space activate a button, while Enter follows a link | 2.1.1 Keyboard (A) | WCAG 2.1.1 (A), APG |
button/activate-on-click | Must | Actions run on click, never on mousedown, pointerdown or touchstart | 2.5.2 Pointer Cancellation (A) | Open Components, beyond WCAG 2.5.2 (A) |
button/dom-order | Must | Buttons come in the same order in the DOM as on screen, without order or row-reverse | 1.3.2 Meaningful Sequence (A), 2.4.3 Focus Order (A) | Open Components, beyond WCAG 1.3.2, 2.4.3 (A) |
button/disabled-inert | Must | A disabled or loading button does nothing, so there's no event, no submission and no navigation | None | HTML, WAI-ARIA |
button/loading | Must | Loading keeps the button's size and name, blocks repeated activation and is announced | 4.1.3 Status Messages (AA) | WCAG 4.1.3 (AA), Open Components |
button/announce-outcome | Should | The page announces the action's outcome with a status message | 4.1.3 Status Messages (AA) | Open Components, beyond WCAG 4.1.3 (AA) |
button/toggle-pressed | Must | A toggle button sets aria-pressed and keeps its label | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A), APG |
button/popup-expanded | Must | A button that opens a popup sets aria-haspopup and aria-expanded | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A), APG |
button/focus-after | Should | After activation, focus moves as the APG describes, and never falls back to the top of the page | None | APG |
button/focus-not-obscured | Must | Sticky headers and footers never cover a focused button, for example thanks to scroll-padding | 2.4.11 Focus Not Obscured (Minimum) (AA), 2.4.12 Focus Not Obscured (Enhanced) (AAA) | WCAG 2.4.11 (AA), 2.4.12 (AAA) |
button/destructive | Should | A destructive action uses error, names what it destroys, and can either be undone or asks for confirmation | 3.3.4 Error Prevention (Legal, Financial, Data) (AA) | Open Components, beyond WCAG 3.3.4 (AA) |
AX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
button/role-and-name | Must | It can be found by its role and name alone, with getByRole("button", { name }) | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A) |
Sources
- Web Content Accessibility Guidelines (WCAG) 2.2, for each success criterion's number, short name and level
- Understanding WCAG 2.2, which each criterion links to
- Accessible Rich Internet Applications (WAI-ARIA) 1.2
- WAI-ARIA Authoring Practices Guide (APG)
- Button, where each rule is explained, with the sources it draws on