Accessibility Wiki

autocomplete attributes must use valid tokens

Rule autocomplete-valid · Forms · impact moderate · Static + live

↩ Back to the rules index · WCAG cross-reference

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

✕ Fails
<input autocomplete="yourname">
✓ Passes
<input autocomplete="name">

Example

✕ Fails
<input autocomplete="webauthn">
✓ Passes
<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.

Understanding 1.3.5

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

References