Accessibility Checklists
Accessible Checkbox Group Checklist (WCAG)
Every Checkbox Group 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 Group 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 Group'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 Group's checklist.
UI rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
checkbox-group/legend-contrast | Must | The legend has a contrast of 4.5:1 against the page | 1.4.3 Contrast (Minimum) (AA) | WCAG 1.4.3 (AA) |
checkbox-group/resizable | Must | The legend, the gaps and the indent are sized in rem, and the legend and a row of options wrap instead of being clipped or scrolling sideways | 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) |
UX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
checkbox-group/fieldset | Must | It's a <fieldset> whose first child is the <legend> that names it, so it has the group role and the legend as its name | 1.3.1 Info and Relationships (A), 4.1.2 Name, Role, Value (A) | WCAG 1.3.1, 4.1.2 (A), HTML |
checkbox-group/legend-question | Must | Every group has a visible legend that says what its options are for, ideally as the question they answer | 1.3.1 Info and Relationships (A), 3.3.2 Labels or Instructions (A) | WCAG 1.3.1, 3.3.2 (A) |
checkbox-group/described | Should | A hint and an error message sit outside the legend and are linked to the <fieldset> with aria-describedby, the hint's ID first | 1.3.1 Info and Relationships (A) | WCAG 1.3.1 (A), APG |
checkbox-group/keyboard | Must | Tab reaches each box in turn, select-all box included, Space toggles the focused one, and the arrow keys never move focus between them | 2.1.1 Keyboard (A) | WCAG 2.1.1 (A), APG |
checkbox-group/select-all-state | Must | The select-all box is checked when every option is, unchecked when none is, and mixed when only some are, worked out from them whenever they change | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A), APG |
checkbox-group/select-all-action | Must | Checking the select-all box, from unchecked or mixed, checks every option, and unchecking it clears them all, without going back to an earlier selection | None | APG, Open Components |
checkbox-group/at-least-one | Must | A group people have to pick from says so in its legend or hint, and is checked in code when the form is sent, never with required on its boxes | 3.3.2 Labels or Instructions (A) | HTML, WCAG 3.3.2 (A) |
checkbox-group/error-message | Must | An invalid group has an error message, in text and linked to the <fieldset> with aria-describedby, that says what to pick | 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-group/invalid-state | Must | The group sets aria-invalid="true" while its error message shows, and each of its options looks and reads invalid with it | 4.1.2 Name, Role, Value (A) | WCAG 4.1.2 (A), Open Components |
checkbox-group/focus-on-error | Should | A failed submit moves focus to the group's first box, once the error is in the page | 3.3.1 Error Identification (A) | Open Components, beyond WCAG 3.3.1 (A) |
AX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
checkbox-group/role-and-name | Must | It can be found by its legend alone, with getByRole("group", { name }), and each option inside it with getByRole("checkbox", { 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
- WAI-ARIA Authoring Practices Guide (APG)
- Checkbox Group, where each rule is explained, with the sources it draws on