Forms
autocomplete must use the standard tokens
- Rule:
autocomplete-valid - Severity: Serious
- WCAG level AA
Why it matters
Correct autocomplete values let a browser fill a form from stored data and let assistive technology explain each field in familiar terms. An invented value turns both off.
How to fix it
- Use the tokens from the HTML specification: email, given-name, postal-code, cc-number, and so on.
- Combine section and billing/shipping prefixes for repeated address blocks.
- Use autocomplete="off" only where the field genuinely must not be remembered.
In markup
<input type="email" autocomplete="yes"><input type="email" autocomplete="email">The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 1.3.5 Identify Input Purpose (opens in new tab) — WCAG level AA
Further reading
Deque University on autocomplete-valid (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.