How to fix autocomplete valid on Squarespace

Add a valid, correctly matched `autocomplete` attribute to every personal-data form field so browsers and assistive technologies can autofill them reliably.

Steps for Squarespace

  1. Squarespace's built-in form blocks and Commerce checkout fields have limited direct HTML editing capabilities.
  2. For built-in Form Blocks: go to the page, click Edit on the form, then click the field to edit it — Squarespace does not expose the autocomplete attribute in the UI, so you must use a CSS/JS injection workaround.
  3. Go to Website → Pages → select the page → Settings (gear icon) → Advanced → Page Header Code Injection, or site-wide via Settings → Advanced → Code Injection.
  4. Add a small JavaScript snippet that runs on DOMContentLoaded and sets the autocomplete attribute on each input by its name or placeholder: document.querySelector('input[name="name"]').setAttribute('autocomplete','name');
  5. For Squarespace Commerce checkout (hosted), autocomplete attributes are managed by Squarespace; contact Squarespace support for compliance concerns.
Official Squarespace documentation ↗
<input type="text"   name="first_name"  autocomplete="given-name"     placeholder="First name">
<input type="text"   name="last_name"   autocomplete="family-name"    placeholder="Last name">
<input type="email"  name="email"        autocomplete="email"           placeholder="Email address">
<input type="tel"    name="phone"        autocomplete="tel"             placeholder="Phone number">
<input type="text"   name="address1"    autocomplete="address-line1"   placeholder="Street address">
<input type="text"   name="city"        autocomplete="address-level2"  placeholder="City">
<input type="text"   name="postcode"    autocomplete="postal-code"     placeholder="Postcode / ZIP">
<input type="text"   name="cc_number"   autocomplete="cc-number"       placeholder="Card number">
<input type="password" name="password"  autocomplete="current-password" placeholder="Password">

What is autocomplete valid?

The HTML `autocomplete` attribute tells browsers (and password managers, screen readers, and autofill tools) exactly what kind of information a form field expects — for example, a shipping first name, a credit card number, or an email address. WCAG 2.1 Success Criterion 1.3.5 ("Identify Input Purpose") requires that any field collecting personal information uses one of the officially recognised `autocomplete` token values, and that the token actually matches what the field is for. If the attribute is missing, misspelled, or set to the wrong value (e.g., `autocomplete="firstname"` instead of `autocomplete="given-name"`), browsers cannot reliably autofill the field and assistive technologies cannot identify its purpose.

Failing WCAG 1.3.5 creates real legal and commercial risk: accessibility laws in the US (ADA), UK (Equality Act), EU (European Accessibility Act), and elsewhere increasingly require WCAG 2.1 AA compliance, and incorrect `autocomplete` is a straightforward, auditable violation. Beyond compliance, customers — especially those with motor disabilities, cognitive impairments, or anyone on a mobile device — rely on browser autofill to complete checkout quickly. Broken autofill adds friction that directly increases cart abandonment and reduces conversion rates. Fixing it is one of the fastest wins you can get on a checkout or registration form.

See the complete Autocomplete valid guide for every platform and the full background.

Not sure if your Squarespace store has this?

Run a free SEOLZ audit — we’ll find autocomplete valid and every other issue across your whole site.

Scan my site free

Fix autocomplete valid on another platform