Input Fields — Accessibility Specification

WCAG 2.1 AA • AODA compliant • Updated 2025-10-28


What is this component?

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.

Accessibility Requirements

RequirementWCAG CriteriaDescription
Programmatic label1.3.1, 3.3.2Use <label for>/id or aria-labelledby. Place labels above inputs for clarity.
Helpful instructions3.3.2Provide examples or hints via aria-describedby (e.g., password rules).
Error identification and suggestion3.3.1, 3.3.3Identify errors in text; provide suggestions to correct when possible.
Keyboard operability2.1.1Reachable by Tab; caret navigation works; shortcuts do not trap focus.
Name, Role, Value4.1.2Expose role “textbox” (or specific types), accessible name from label, and current value; set autocomplete where applicable.

ARIA Roles and Attributes

ARIA Role/AttributeUsed OnPurpose & Usage
<input type="text|email|password|number|search|url|tel">Native inputsPreferred; include appropriate autocomplete tokens.
aria-describedbyInputs with help or error textProgrammatically associates hints and validation messages.
aria-invalid="true"Invalid inputsSet when validation fails to announce error state.

Implementation Guidelines




We’ll send confirmations to this address.

8+ chars, one number, one symbol.

DO’s

Don’ts

Common Pitfalls

Testing Checklist

Test ItemWCAG CriteriaPass Criteria
Label and Role1.3.1, 4.1.2Screen reader announces label and type (e.g., “Email, edit”).
Hints and Errors3.3.1, 3.3.2Hints and errors are announced via aria-describedby.
Keyboard2.1.1Reachable, editable, and no traps; Tab order follows layout.
Contrast1.4.3Field text and error indicators meet contrast requirements.