Accessibility Checklists
Accessible Textarea Checklist (WCAG)
Every Textarea 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 Textarea 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 Textarea'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 Textarea's checklist.
UI rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
textarea/contrast | Must | The text, the placeholder and the count 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) |
textarea/boundary-contrast | Must | The border has a contrast of 3:1 against the page, so an empty textarea stays visible | 1.4.11 Non-text Contrast (AA) | WCAG 1.4.11 (AA) |
textarea/focus-visible | Must | Focus shows an outline at least 2px thick around the 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) |
textarea/target-size | Must | The field is at least 24px tall, and 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) |
textarea/resizable | Must | Its height is a minimum, in lines of its own line height plus 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) |
textarea/fits-text | Should | Its rows fit the text it expects, and it's never wider than its column | 1.4.10 Reflow (AA) | Open Components, beyond WCAG 1.4.10 (AA) |
UX rules
| Rule | Level | Requirement | WCAG 2.2 | Basis |
|---|---|---|---|---|
textarea/native-element | Must | It's a native <textarea>, and never a contenteditable element or a role="textbox" | 2.1.1 Keyboard (A), 4.1.2 Name, Role, Value (A) | Open Components, beyond WCAG 2.1.1, 4.1.2 (A) |
textarea/visible-label | Must | Every textarea has a visible <label>, linked with for, rather than a placeholder alone | 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) |
textarea/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) |
textarea/described | Should | Hints, like what to include, are linked with aria-describedby, and a placeholder only ever shows a short example | 1.3.1 Info and Relationships (A) | WCAG 1.3.1 (A), Open Components |
textarea/keyboard | Must | Tab moves focus to and from it, and the browser's text editing keys work as they do in any textarea | 2.1.1 Keyboard (A), 2.1.2 No Keyboard Trap (A) | WCAG 2.1.1, 2.1.2 (A) |
textarea/limit-in-hint | Should | A limit is stated in the hint, linked with aria-describedby, before people start writing | 3.3.2 Labels or Instructions (A) | WCAG 3.3.2 (A) |
textarea/count | Should | The count says how many characters are left, or how many too many, describes the textarea, and over the limit sets aria-invalid="true" | 3.3.1 Error Identification (A) | WCAG 3.3.1 (A), Open Components |
textarea/announce-count | Should | The count is announced through one polite live region once people pause near the limit, and never on every keystroke | 4.1.3 Status Messages (AA) | WCAG 4.1.3 (AA), Open Components |
textarea/input-purpose | Must | A textarea that asks for the person's own address has autocomplete="street-address" | 1.3.5 Identify Input Purpose (AA) | WCAG 1.3.5 (AA) |
textarea/error-message | Must | An invalid textarea 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) |
textarea/invalid-state | Must | A textarea 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 |
textarea/focus-not-obscured | Must | Sticky headers and footers never cover a focused textarea, 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 |
|---|---|---|---|---|
textarea/role-and-name | Must | It can be found by its role and label alone, with getByRole("textbox", { 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
- Textarea, where each rule is explained, with the sources it draws on