autocomplete attributes must use valid tokens
Rule
autocomplete-valid· Forms · impact moderate · Static + live
Why it matters
A valid autocomplete value lets browsers autofill and lets assistive tech describe a field’s purpose (and apply personalized icons). An invalid token does neither.
How to fix
Use a token from the HTML autofill field list (e.g. given-name, email, postal-code), optionally prefixed by section-*/shipping/billing.
Example
<input autocomplete="yourname">
<input autocomplete="name">
Example
<input autocomplete="webauthn">
<input autocomplete="username webauthn">
WCAG success criteria
1.3.5 Identify Input Purpose — Level AA
Inputs collecting common user information should declare their purpose (e.g. a valid autocomplete token) so browsers and AT can assist.
Standards
This rule contributes to the following standards:
WCAG AA EN 301 549 ACT
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.1.3.5 |
| ACT (WCAG SC) | 1.3.5 |