How to fix autocomplete valid on WooCommerce
Add a valid, correctly matched `autocomplete` attribute to every personal-data form field so browsers and assistive technologies can autofill them reliably.
Steps for WooCommerce
- WooCommerce's default checkout and My Account forms are output by WooCommerce templates and already include autocomplete attributes, but themes or plugins may override them.
- To override safely, copy the relevant template from wp-content/plugins/woocommerce/templates/ (e.g., checkout/form-billing.php, checkout/form-shipping.php) into wp-content/themes/your-theme/woocommerce/ preserving the folder structure.
- Open the copied file and locate each <input> element; add or correct the autocomplete attribute using the correct HTML token (e.g., autocomplete='given-name').
- Alternatively, use the woocommerce_checkout_fields filter in your child theme's functions.php or a custom plugin to programmatically inject the autocomplete value into the field's attributes array.
- Save, clear any caching plugins, and verify with axe DevTools.
<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 WooCommerce 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