← All criteria
3.1.1 (html lang)Level AWCAG 2.0Auto-fix: Yes

Language of Page — HTML lang attribute

The default human language of each page must be programmatically determinable through the `lang` attribute on the `<html>` element. Required value follows BCP 47 (e.g. `en`, `en-US`, `fr-FR`).

What it requires

A more focused subsection of WCAG 3.1.1. The `lang` attribute on `<html>` is the foundation; everything else (3.1.2 Language of Parts, screen-reader pronunciation rules, browser translation prompts) builds on it.

Common Shopify failure mode: theme.liquid uses `<html lang="en">` hard-coded even when the merchant has configured the storefront for multiple languages via Shopify Markets. The fix is one Liquid expression.

Common Shopify failure

Theme.liquid layout has `<html lang="en">` hard-coded. Merchant has activated French + Spanish via Shopify Markets but every storefront page still ships with `lang="en"` — screen readers pronounce French/Spanish content with English phonetic rules.

How to fix it

Auto-fix replaces hard-coded `<html lang="en">` with `<html lang="{{ request.locale.iso_code }}">` so the language matches the storefront's configured locale.

Primary source: W3C — WCAG 2.0 Understanding 3.1.1 (html lang)