liveBook · Manning

Autofill

As explained in Architecting Accessibility

An HTML attribute that allows a browser to provide or select suggested values for a form control based on stored information.

The HTML autocomplete attribute tells browsers and assistive technologies what a form field is for. That can make personal details easier to enter, save time, and reduce typing errors. section 6.1.8

Choose values that match what each field collects:

  • Use name, given-name, or family-name for a person’s own name; use current-password or new-password to support sign-in and password managers. section 6.1.8
  • Avoid applying personal autofill to third-party details, such as an emergency contact’s name. Omitting autocomplete may be safer than autocomplete="off", which cannot guarantee autofill is prevented. section 6.1.8
<input autocomplete="shipping postal-code">
<input autocomplete="billing postal-code"> 

Compare autocomplete values for shipping and billing postal-code fields. section 6.1.8

<input autocomplete="section-guest1 given-name">
<input autocomplete="section-guest2 given-name">

See how section tokens distinguish the names of different guests. section 6.1.8

How Architecting Accessibility covers it

How deep it goes
Demonstrates name and password values, and cautions that autocomplete="off" cannot guarantee autofill suppression.
Examples
Uses personal names, passwords, emergency contacts, postal codes, and separate guest fields as examples.
What you can do after
Apply it via HTML autocomplete values to identify fields and support accurate autofill.
How it connects
Connects HTML form controls with assistive technologies, browsers, and password managers.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.