Accessibility Checklists
Accessible Input Checklist (WCAG)
Every Input 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 Input 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 Input'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 Input's checklist.
UI rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
input/contrast | Must | The value, the placeholder, prefixes and suffixes have 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) |
input/boundary-contrast | Must | The border has a contrast of 3:1 against the page, so an empty input stays visible | 1.4.11 Non-text Contrast (AA) | WCAG 1.4.11 (AA) |
input/focus-visible | Must | Focus shows an outline at least 2px thick around the whole field, outside its border | 2.4.7 Focus Visible (AA), 2.4.13 Focus Appearance (AAA) | WCAG 2.4.7 (AA), 2.4.13 (AAA) |
input/target-size | Must | The field is at least 24px tall, with a hit area at least 44px tall 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) |
input/resizable | Must | The field is sized with min-height and padding in rem, so it grows with its text instead of clipping it | 1.4.4 Resize Text (AA), 1.4.12 Text Spacing (AA) | Open Components, beyond WCAG 1.4.4, 1.4.12 (AA) |
input/fits-value | Should | Its width fits the value it expects, like a short one for a postcode, and never outgrows the screen | 1.4.10 Reflow (AA) | Open Components, beyond WCAG 1.4.10 (AA) |
UX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
input/native-element | Must | It's a native <input>, and never a contenteditable element | 2.1.1 Keyboard (A), 4.1.2 Name, Role, Value (A) | Open Components, beyond WCAG 2.1.1, 4.1.2 (A) |
input/visible-label | Must | Every input has a visible <label>, linked with for, rather than a placeholder alone, unless it's a search next to its Search button, named with 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) |
input/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) |
input/described | Should | Hints, like the format it expects, are linked with aria-describedby, and a placeholder only ever shows an example | 1.3.1 Info and Relationships (A) | WCAG 1.3.1 (A), Open Components |
input/decorative-slots | Must | leading and trailing are hidden from assistive technologies with aria-hidden, while actions stay reachable | 1.1.1 Non-text Content (A) | WCAG 1.1.1 (A) |
input/units-in-label | Must | A prefix or a suffix, like a currency or a unit, is in the label or the hint as well | 1.3.1 Info and Relationships (A) | WCAG 1.3.1 (A) |
input/input-purpose | Must | An input that asks about the person filling it in has the matching autocomplete, like email or tel | 1.3.5 Identify Input Purpose (AA) | WCAG 1.3.5 (AA) |
input/keyboard | Must | Tab reaches the input and then its actions, and the browser's text editing keys work as they do in any text field | 2.1.1 Keyboard (A) | WCAG 2.1.1 (A) |
input/allow-paste | Must | Pasting, autofill and password managers are never blocked | 3.3.8 Accessible Authentication (Minimum) (AA) | WCAG 3.3.8 (AA) |
input/error-message | Must | An invalid input has an error message, in text and linked with aria-describedby, that says what's wrong and how to fix it | 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) |
input/invalid-state | Must | An input 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 |
input/action-buttons | Must | Buttons in actions are named Buttons that Tab reaches after the input, and one that goes away moves focus back to the input | 2.1.1 Keyboard (A), 2.4.3 Focus Order (A), 4.1.2 Name, Role, Value (A) | WCAG 2.1.1, 2.4.3, 4.1.2 (A) |
input/focus-not-obscured | Must | Sticky headers and footers never cover a focused input, 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 |
|---|---|---|---|---|
input/role-and-name | Must | It can be found by its role and label alone, with getByRole("textbox", { name }), or with getByLabel for a password | 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
- Input, where each rule is explained, with the sources it draws on