Autofill and identifying input purpose
Browsers could fill in details people have typed before, but many forms do not let them.
The answer
Mark each field with what it is for, and never block autofill, pasting or password managers. As strong as the weakest rule behind it: settled.
-
Mark each personal-details field with the standard autocomplete token for what it holds.
WCAG 2.2 level AA (1.3.5). Reopened and checked in the pilot; the token table in the HTML standard was read directly.
- Applies when
- The person is entering their own details.
- Based on
- Standard or law
- Depends on
- Whose details they enter
- Principle
- Work for everyone
- Common mistake
- Made-up token values, which fail 1.3.5 (MDN, WCAG technique H98).
- StandardsStandard: H98: Using HTML autocomplete attributesW3C WAI
- Standard: HTML Standard, autofill field names for telephone numbersWHATWG
- GuidanceGuidance: wcag22-1.3.5
- Guidance: HTML attribute: autocompleteMDN Web Docs
-
Don’t block pasting, password managers or autofill on sign-in fields.
WCAG 2.2 level AA (3.3.8): blocking paste generally fails unless another method is offered. NIST's 2025 standard says the same. Both reopened and checked.
- Applies when
- The field is part of authentication.
- Based on
- Standard or law
- Principle
- Work for everyone
- Common mistake
- Blocking paste into password or code fields (rule 2).
- StandardsStandard: Understanding SC 3.3.8: Accessible Authentication (Minimum)W3C WAI, 2023
- Standard: NIST SP 800-63B-4 Digital Identity Guidelines, Authentication and Authenticator Management (Sec. 4.2 Account Recovery; Sec. 3.1.1.2)NIST, 2025
The other rules
-
Don’t ask for something twice in the same process. Fill it in, or let people pick it.
WCAG 2.2 level A (3.3.7). Browser autofill does not satisfy it; the site must supply the value. Reopened and checked.
- Applies when
- Information was given earlier in the same process.
- Based on
- Standard or law
- Principle
- Recognition over recall
- StandardStandard: Understanding SC 3.3.7 Redundant EntryW3C WAI
-
Leave autofill on. Turn it off only for one-time values, such as a code.
The HTML standard, MDN, Apple and Google agree, and MDN and Apple note browsers ignore the off setting on sign-in fields anyway. Rated 3.
- Applies when
- Always.
- Based on
- Convention
- Principle
- Let practiced people go faster
- Common mistake
- Turning autofill off on address or payment forms.
- StandardStandard: HTML Living Standard, 4.10.19.7 Autofill (autocomplete attribute, off/on, one-time-code)WHATWG
- GuidanceGuidance: Turning off form autocompletion (MDN practical implementation guide)Mozilla
- Guidance: Improving AutoFill experiences for your forms (Safari developer documentation)Apple, 2026
- Guidance: Autofill (Learn Forms)web.dev, 2021
-
Use one field for any value browsers store whole, such as a phone or card number.
Browser vendors' guidance; no independent test. Rated 3.
- Applies when
- Always.
- Based on
- Convention
- Principle
- Let practiced people go faster
- GuidanceGuidance: Address form best practices codelab
- Guidance: Build an address form that follows best practice
- Guidance: HTML attribute: autocompleteMDN Web Docs
-
Mark a text-message code field with the one-time-code token so the phone can offer the code.
Google's guidance and the HTML standard. Rated 3.
- Applies when
- The field takes a one-time code.
- Based on
- Convention
- Principle
- Let practiced people go faster
- StandardStandard: HTML Living Standard, 4.10.19.7 Autofill (autocomplete attribute, off/on, one-time-code)WHATWG
- GuidanceGuidance: SMS OTP form best practicesweb.dev, 2020
-
Don’t autofill hidden fields, and keep filled fields’ labels visible so people can check them.
A 2017 proof of concept showed a browser filling hidden fields; NN/g notes wrong autofill is hard to spot without labels. My inference from a demo and an essay, so 2.
- Applies when
- Always.
- Based on
- Reasoned, not tested
- Principle
- Keep people in control
- GuidanceGuidance: Browser autofill phishing (proof-of-concept demo repository) and news coverageViljami Kuosmanen, 2017
- Guidance: Placeholders in Form Fields Are HarmfulKatie Sherwin, 2014
Accessibility
Open questions
- OpenHow much autofill helps. Chrome's own telemetry links it to about 75% less abandonment and 35% less time, and one analytics vendor reports higher completion across 215 forms; both are correlations, and the vendor saw about one form in ten do worse.
- OpenNo study of autofill accuracy or of errors from wrongly filled fields was found.
- OpenBaymard notes many people do not use autofill and that it fails for addresses not yet saved.
Sources
- StandardsStandard: H98: Using HTML autocomplete attributesW3C WAI
- Standard: HTML Standard, autofill field names for telephone numbersWHATWG
- Standard: Understanding SC 3.3.8: Accessible Authentication (Minimum)W3C WAI, 2023
- Standard: NIST SP 800-63B-4 Digital Identity Guidelines, Authentication and Authenticator Management (Sec. 4.2 Account Recovery; Sec. 3.1.1.2)NIST, 2025
- Standard: Understanding SC 3.3.7 Redundant EntryW3C WAI
- Standard: HTML Living Standard, 4.10.19.7 Autofill (autocomplete attribute, off/on, one-time-code)WHATWG
- GuidanceGuidance: wcag22-1.3.5
- Guidance: HTML attribute: autocompleteMDN Web Docs
- Guidance: Turning off form autocompletion (MDN practical implementation guide)Mozilla
- Guidance: Improving AutoFill experiences for your forms (Safari developer documentation)Apple, 2026
- Guidance: Autofill (Learn Forms)web.dev, 2021
- Guidance: Address form best practices codelab
- Guidance: Build an address form that follows best practice
- Guidance: SMS OTP form best practicesweb.dev, 2020
- Guidance: Browser autofill phishing (proof-of-concept demo repository) and news coverageViljami Kuosmanen, 2017
- Guidance: Placeholders in Form Fields Are HarmfulKatie Sherwin, 2014
Related
- Phone number inputAsk only if you will use it, take it in one field, and accept the number however it is written.Answer: moderate.
- Postal addressOffer an address lookup where the data is reliable, and always let people type the address by hand.Answer: moderate.
- NameAccept names as people write them, in any script, and do not require exactly two parts.Answer: weak.
- Payment cardTake the card number in one field, with or without spaces, and work out the card type yourself.Answer: moderate.
- One-time codesUse one field that can be pasted into and filled automatically, and do not submit by itself.Answer: moderate.
- Password creationRequire length, not character mixes, allow password managers, and offer a way to show the password.Answer: moderate.
- Log inNever block paste or password managers, and slow repeated attempts instead of locking people out.Answer: weak.