Which WCAG criterion this fails
- Does not meet 3.1.1 Language of Page (Level A)
How to fix it on WooCommerce
Everything below is done from Appearance > Theme File Editor, or your child theme over SFTP. Take a copy of the theme before editing.
- Open layout/theme.liquid and correct the value on the <html> tag.
- Use the two-letter code alone ("en", "de", "fr") or code-REGION with a hyphen ("en-US", "pt-BR"). Never an underscore, never the language name.
- On a Shopify Markets store, use {{ request.locale.iso_code }} rather than hardcoding — it always emits a valid tag.
- If part of the page is in another language, wrap that block in an element with its own lang attribute instead of changing the page-level one.
Where this usually lives
header.php via language_attributes(), and Settings > General > Site Language
Paths given for Storefront, Astra, Flatsome and other WooCommerce themes. A heavily customised theme may differ; the CSS selector in your scan report points at the exact element.
Code
<!-- Invalid -->
<html lang="english"> <html lang="en_US">
<!-- Valid -->
<html lang="en"> <html lang="en-US">
<!-- Mixed-language block -->
<p>Our motto is <span lang="fr">joie de vivre</span>.</p>How to confirm it is fixed
Re-run the scan. This rule should drop out of the findings entirely. If the instance count falls but does not reach zero, the same defect exists in another template — product cards and quick-view modals are the usual second home for it.
Effort: low. Rule id: html-lang-valid (axe-core).