Accessibility Checklists
Accessible Checkbox Checklist (WCAG)
Every Checkbox 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 Checkbox 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 Checkbox'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 Checkbox's checklist.
UI rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
checkbox/contrast | Must | The label has a contrast of 4.5:1, 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) |
checkbox/boundary-contrast | Must | The box's border and a checked box's fill have 3:1 against the page, and the check and the dash have 3:1 against the fill | 1.4.11 Non-text Contrast (AA) | WCAG 1.4.11 (AA) |
checkbox/focus-visible | Must | Keyboard focus shows an outline at least 2px thick around the box, outside its border, on :focus-visible | 2.4.7 Focus Visible (AA), 2.4.13 Focus Appearance (AAA) | WCAG 2.4.7 (AA), 2.4.13 (AAA) |
checkbox/target-size | Must | The box has a hit area of at least 24 × 24px that toggles it, without counting its label | 2.5.8 Target Size (Minimum) (AA) | Open Components, beyond WCAG 2.5.8 (AA) |
checkbox/distinct-marks | Must | Checked shows a check and indeterminate a dash, so the two never rely on colour to tell them apart | 1.4.1 Use of Color (A) | WCAG 1.4.1 (A) |
checkbox/resizable | Must | The box, its gap and its hit area are sized in rem, and the label wraps beside the box instead of being clipped | 1.4.4 Resize Text (AA), 1.4.12 Text Spacing (AA) | Open Components, beyond WCAG 1.4.4, 1.4.12 (AA) |
UX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
checkbox/native-element | Must | It's a native <input type="checkbox">, never an element with role="checkbox" | 2.1.1 Keyboard (A), 4.1.2 Name, Role, Value (A) | Open Components, beyond WCAG 2.1.1, 4.1.2 (A) |
checkbox/label-toggles | Must | Its <label> wraps the box and its text, so the text names it and a press on the text toggles it, unless it's read-only | 1.3.1 Info and Relationships (A), 4.1.2 Name, Role, Value (A) | WCAG 1.3.1, 4.1.2 (A), HTML |
checkbox/visible-label | Must | Every checkbox has visible text, unless its context names it, like a row in a table, in which case it has an aria-label | 1.3.1 Info and Relationships (A), 3.3.2 Labels or Instructions (A), 4.1.2 Name, Role, Value (A) | WCAG 1.3.1, 3.3.2, 4.1.2 (A) |
checkbox/label-in-name | Must | An aria-label or aria-labelledby includes the visible text, ideally at the start | 2.5.3 Label in Name (A) | WCAG 2.5.3 (A) |
checkbox/described | Should | Hints sit outside the label and are linked with aria-describedby | 1.3.1 Info and Relationships (A) | WCAG 1.3.1 (A) |
checkbox/decorative-indicator | Must | The check and the dash are hidden from assistive technologies with aria-hidden, so the name is the label alone | 1.1.1 Non-text Content (A), 4.1.2 Name, Role, Value (A) | WCAG 1.1.1, 4.1.2 (A) |
checkbox/keyboard | Must | Tab reaches the box, Space checks or unchecks it unless it's read-only, and Enter never toggles it | 2.1.1 Keyboard (A) | WCAG 2.1.1 (A), APG |
checkbox/indeterminate | Must | The mixed state is set as the <input>'s indeterminate property, so it's announced as mixed, and it clears on the first click | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A), HTML |
checkbox/required | Should | A box people have to check has required, which lands on the <input>, while optional boxes don't | 3.3.2 Labels or Instructions (A) | HTML, WCAG 3.3.2 (A) |
checkbox/error-message | Must | An invalid checkbox has an error message, in text and linked with aria-describedby, that says why it needs checking | 1.4.1 Use of Color (A), 3.3.1 Error Identification (A), 3.3.3 Error Suggestion (AA) | WCAG 1.4.1, 3.3.1 (A), 3.3.3 (AA) |
checkbox/invalid-state | Must | A checkbox sets aria-invalid="true" while its error message shows, and only looks invalid when it does | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A), Open Components |
checkbox/read-only | Must | A read-only checkbox sets aria-readonly="true", stays focusable and is sent with its form, while a click, its label or Space never change it | None | WAI-ARIA, Open Components |
checkbox/focus-not-obscured | Must | Sticky headers and footers never cover a focused checkbox, 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) |
AX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
checkbox/role-and-name | Must | It can be found by its role and label alone, with getByRole("checkbox", { name }), and reports checked, unchecked or mixed | 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)
- Checkbox, where each rule is explained, with the sources it draws on