Skip to content
StoreA11y

Shopify · 3.1.1 Language of Page (Level A)

Page does not declare a language on Shopify

The <html> element has no lang attribute. A screen reader falls back to the user's own system language, so an English store can be read aloud with, for example, German pronunciation rules — often to the point of being unintelligible. This is a one-line fix and it appears in filed complaints.

Frequently litigated

A missing language declaration is a one-line defect that expert reports flag as evidence of no testing at all.

Which WCAG criterion this fails

  • Does not meet 3.1.1 Language of Page (Level A)

How to fix it on Shopify

Everything below is done from Online Store > Themes > Edit code. Take a copy of the theme before editing.

  1. Online Store > Themes > Edit code > layout/theme.liquid.
  2. Find the opening <html> tag on roughly the second line.
  3. Set lang from the store locale so translated storefronts stay correct: <html lang="{{ request.locale.iso_code }}">.
  4. If the theme is single-language and does not use Shopify Markets, a hardcoded lang="en" is acceptable.
  5. Check layout/password.liquid too — the password page is a separate layout and is frequently missed.

Where this usually lives

layout/theme.liquid (line ~2), layout/password.liquid

Paths given for Dawn and its derivatives (Sense, Craft, Refresh, Studio). A heavily customised theme may differ; the CSS selector in your scan report points at the exact element.

Code

<!doctype html>
<html class="no-js" lang="{{ request.locale.iso_code }}">
<head>
  …

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-has-lang (axe-core).