0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Tells the browser and password managers what a field holds, so saved names, addresses, cards, passwords and one-time codes can be filled in one step.
Overview
autocomplete names the kind of data a field expects, using autofill tokens such as email, shipping postal-code or current-password. With the right tokens, browsers and password managers fill a whole address or sign-in form in one step, which matters most on phones. On a <form>, on or off sets the default for controls that don't say otherwise.
A value is either on, off, or an ordered list of tokens: optional modifiers, then one field name, then optionally webauthn.
Value
Meaning
on
Autofill allowed; the browser guesses the field type.
off
Don't offer saved data for this field. Browsers generally honour it for ordinary fields; password managers may still offer credentials on login fields.
A field name (tables below)
This field holds that piece of data.
Absent
The control uses its form's autocomplete; a form without one counts as on.
Anything else
Invalid; treated as if no token was given. Made-up values are non-conforming and their effect varies by browser.
Modifiers
Token
Purpose
section-name
Groups fields so two addresses on one page (sender and recipient) fill separately. Comes first.
shipping / billing
Which address or contact the field belongs to.
home, work, mobile, fax, pager
Kind of contact, before tel, email and the other contact fields: work email, mobile tel.
webauthn
Last token on a username or password field. Lets the browser offer saved passkeys in the field's autofill list (passkey "conditional UI").
street-address (multi-line, use a textarea), address-line1–3, address-level2 (city), address-level1 (state or province), postal-code, country (code), country-name
<formaction="/sign-in"method="post"><form-field><labelfor="username">Email or username</label><inputtype="text"id="username"name="username"autocomplete="username webauthn" /></form-field><form-field><labelfor="password">Password</label><inputtype="password"id="password"name="password"autocomplete="current-password" /></form-field><buttontype="submit">Sign in</button></form>
webauthn only shows passkeys when the page has also started a conditional request: navigator.credentials.get({ mediation: 'conditional', publicKey: ... }).
New password
new-password tells password managers to suggest a generated password and save it, instead of filling the old one.
Registration
<form-field><labelfor="new-password">Choose a password</label><inputtype="password"id="new-password"name="password"autocomplete="new-password"minlength="12"required /><outputclass="hint"for="new-password">At least 12 characters.</output></form-field>
One-time codes
one-time-code lets the phone offer a code from an SMS or email above the keyboard. In VB, an OTP field adds it for you (see below).
OTP field
<form-field><labelfor="code">Verification code</label><inputtype="text"id="code"name="code"data-type="otp"data-length="6"required /><outputclass="hint"for="code">We sent a 6-digit code to your phone.</output></form-field>
Drafts never store secrets.data-autosave and data-wizard-persist skip any control whose own autocomplete is off or contains cc-number, cc-csc, cc-exp, cc-exp-month, cc-exp-year, one-time-code, new-password or current-password, as well as password, hidden and file inputs (src/utils/_persist-filter.js). Correct tokens on payment fields keep card data out of localStorage. The filter reads each control's attribute, not the form's, so <form autocomplete="off"> alone does not exclude its fields.
OTP fields.<form-field> with input[data-type="otp"] splits the input into digit boxes and moves autocomplete="one-time-code" (or the value you set) to the first box, which accepts a whole pasted or autofilled code. The digits use inputmode="numeric". data-type="pin" uses off instead (src/lib/form-field-enhancements.js).
WCAG 1.3.5 (Identify Input Purpose, AA) asks that fields collecting information about the user carry the matching autofill token. Correct tokens also let assistive tools add icons or familiar labels.
Autofill saves typing for people with motor or cognitive disabilities. Don't turn it off without a reason.
Keep visible labels; autofill is not a substitute for knowing what a field is.
Security
autocomplete="off" is not a security control. Users can still paste, and password managers may ignore it on credential fields. Use it for fields where a remembered value is wrong (a one-time search box, a field for someone else's details), not to "protect" passwords.
Use new-password on sign-up and change-password forms so password managers generate strong, unique passwords.
Gotchas
Made-up values such as autocomplete="nope" are invalid HTML and behave differently from browser to browser. To stop autofill on a field, use off; to stop a password manager filling the wrong password, use the right token (new-password).
Autofill fills by token, not by name or id. A field whose label says "City" but whose token says postal-code gets the postal code.
street-address is multi-line; use it on a <textarea>, or split into address-line1 and address-line2 inputs.
Autofill fires input and change events, but some browsers fill several fields at once before focus moves. Validate on submit as well as on blur.