WCAG 3.1.1 (A)

The page has no lang attribute

What this failure is

Every web page should start with a tag that says which language it is written in, like <html lang="en"> for English or <html lang="de"> for German. When that is missing, screen readers such as NVDA, JAWS and VoiceOver do not know which pronunciation dictionary to load. They fall back to the reader's own operating-system language, which for a French customer visiting a German site means the whole page is read aloud with French phonemes. That sounds like nonsense and most users simply give up. Search engines also use the lang attribute as one signal to decide which country and language results a page belongs to, so the missing attribute has a small SEO cost too.

Reference: WCAG 3.1.1 (A) — the authoritative spec.

Who it affects

How to fix it

Concrete steps for the four platforms most small e-commerce sites run on. If you use a different stack, the underlying HTML change is the same.

Shopify

The lang attribute is written into your theme's theme.liquid file, usually as <html lang="{{ request.locale.iso_code }}">. First check Settings > Languages and make sure your primary language is set correctly — if it is missing the Liquid variable resolves to empty. If your theme's theme.liquid does not include the attribute at all, open Online Store > Themes > (your theme) > Actions > Edit code, open layout/theme.liquid, and change the opening tag to <html lang="{{ request.locale.iso_code }}">. Free themes from Shopify have shipped with this since 2019, so the problem usually affects older third-party themes.

WooCommerce

WordPress sets the lang attribute from Settings > General > Site Language in wp-admin, using the language_attributes() function in your theme's header.php. If the attribute is missing, either your theme has hard-coded <html> without calling language_attributes(), or a caching plugin is stripping it. Open Appearance > Theme File Editor, find header.php, and change the opening tag to <html <?php language_attributes(); ?>>. If you are on a managed host that disables the file editor, use a child theme or ask support to apply the change.

Wix

Wix sets the lang attribute automatically from your site's language settings. Go to Settings > Language & Region in your site dashboard and confirm the main site language is set. If you use Wix Multilingual, each language variant gets its own lang attribute — check that every language you have added shows a flag and a language code, not a blank entry. You cannot edit the raw <html> tag in the Wix editor, so if the attribute is still missing after checking settings, contact Wix support with your site URL.

Squarespace

Squarespace sets the lang attribute from Settings > Language & Region > Site Language. Change the dropdown to the language your content is actually written in and save. The change takes effect on the next page load. Squarespace does not let you edit the <html> tag directly — Code Injection only reaches inside <head> and <body> — so if the attribute is still wrong after saving, you likely have Code Injection JavaScript that is rewriting the tag; remove it and re-test.

Notes

If your site is genuinely multilingual, individual passages in a second language should be wrapped in a span or div with its own lang attribute (WCAG 3.1.2). This scanner only checks the top-level <html> tag.

Check your own site

Our accessibility statement scan is free and reports findings only — we do not certify sites.

Scan a URL