autocomplete belongs on the field the user fills in
Rule
autocomplete-not-hidden· Forms · impact minor · Static + live
Why it matters
Identify Input Purpose works by tagging the control the user actually types into, so a browser or assistive tool can fill it or re-label it with familiar wording. An autocomplete token on a hidden input describes a field nobody can see or reach, and the visible control it stands in for is left unidentified.
How to fix
Put the autocomplete token on the visible input, select or textarea the user completes, and remove it from the hidden field carrying the value.
Example
<input type="hidden" autocomplete="email" name="e">
<input type="email" autocomplete="email" name="e">
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
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.1.3.5 |