WCAG 2.1 AA • AODA compliant • Updated 2025-10-28
What is this component? Input fields collect free‑form user data such as text, email, password, numbers, and dates. Native inputs expose role, name, value and provide built‑in keyboard behavior.
Where and how is it used? Forms, search bars, authentication, profile settings—anywhere user input is required.
| Requirement | WCAG Criteria | Description |
|---|---|---|
| Programmatic label | 1.3.1, 3.3.2 | Use <label for>/id or aria-labelledby. Place labels above inputs for clarity. |
| Helpful instructions | 3.3.2 | Provide examples or hints via aria-describedby (e.g., password rules). |
| Error identification and suggestion | 3.3.1, 3.3.3 | Identify errors in text; provide suggestions to correct when possible. |
| Keyboard operability | 2.1.1 | Reachable by Tab; caret navigation works; shortcuts do not trap focus. |
| Name, Role, Value | 4.1.2 | Expose role “textbox” (or specific types), accessible name from label, and current value; set autocomplete where applicable. |
| ARIA Role/Attribute | Used On | Purpose & Usage |
|---|---|---|
<input type="text|email|password|number|search|url|tel"> | Native inputs | Preferred; include appropriate autocomplete tokens. |
aria-describedby | Inputs with help or error text | Programmatically associates hints and validation messages. |
aria-invalid="true" | Invalid inputs | Set when validation fails to announce error state. |
We’ll send confirmations to this address.
8+ chars, one number, one symbol.
aria-describedby.type and autocomplete to improve UX and AT.aria-invalid.aria-describedby.type leads to inefficient input.| Test Item | WCAG Criteria | Pass Criteria |
|---|---|---|
| Label and Role | 1.3.1, 4.1.2 | Screen reader announces label and type (e.g., “Email, edit”). |
| Hints and Errors | 3.3.1, 3.3.2 | Hints and errors are announced via aria-describedby. |
| Keyboard | 2.1.1 | Reachable, editable, and no traps; Tab order follows layout. |
| Contrast | 1.4.3 | Field text and error indicators meet contrast requirements. |