WCAG A/AA requirement Priority: Serious
The page does not say which language it is in
The page does not declare its language, so assistive technology has to guess how to pronounce the text.
This text was translated automatically and has not been reviewed by a native speaker yet.
Why it matters to your customers
A screen reader may read Polish or German text with English pronunciation, making product descriptions hard to follow. Automatic translation and some browser features also work less well.
Who is affected
- blind customers
- screen reader users
- people who use read-aloud or translation tools
How to fix it
Add a lang attribute to the <html> element with the page's main language, for example <html lang="de">. On multilingual sites set it per language version. Use lang on smaller parts that are in another language.
On Shopify
Shopify themes usually set the language from the store's locale in the main layout file. If it is missing, add the lang attribute to the <html> tag in the theme's layout Liquid file.
On Shoptet (CZ)
The template normally sets the language. If it is missing, report it to Shoptet or a partner, since the base layout is part of the template.
On PrestaShop
The theme's main layout template normally sets lang from the shop language. If it is missing, add it to the <html> tag in the theme's layout .tpl file.
On WooCommerce
WordPress normally prints the language through the theme's header template. If it is missing, the theme's header file likely does not call the standard language attributes function; fix it in a child theme.
Fix it with AI
Copy this prompt into ChatGPT, Claude or Copilot and add the HTML of the element. Check the answer before you publish it.
You are an experienced web developer and accessibility specialist. Fix this accessibility problem on my website so that it meets WCAG 2.2 level AA. Website: [https://…] ## Problem: The page does not say which language it is in WCAG 2.2 3.1.1 (A) The page does not declare its language, so assistive technology has to guess how to pronounce the text. **How to fix:** Add a lang attribute to the <html> element with the page's main language, for example <html lang="de">. On multilingual sites set it per language version. Use lang on smaller parts that are in another language. ## Elements found by the automated check [Paste the HTML of the element here, or the selector from the Pandus report] ## Requirements - Change only what is needed; keep the design and how the site works. - Do not add accessibility overlays or widgets; fix the code or the content. - Show the corrected code and say in which template or file it goes. - Explain how to check the fix with the keyboard and a screen reader.
Standards
| Standard | Clause |
|---|---|
| WCAG 2.2 | 3.1.1 (A) Language of Page |
| WCAG 2.1 | 3.1.1 (A) Language of Page |
| WCAG 2.0 | 3.1.1 (A) Language of Page |
| EN 301 549 4.1.1 | 9.3.1.1 |
| EN 301 549 3.2.1 | 9.3.1.1 |
| Section 508 2017 | E205.4 |
| ДСТУ EN 301 549 2022 | 9.3.1.1 |
Automated check: axe-core rule html-has-lang.
dequeuniversity.com, github.com, www.w3.org
Read next
WCAG success criterion
Guides and tools
- WCAG 2.2 AA checklist for online shops
- HTML accessibility checker (WCAG 2.2)
- Free WCAG checker for WCAG 2.2 AA
Help articles
-
How to read a report and what to fix first
What each part of the report means and how to turn it into a to-do list for your developer.
Related checks
-
The whole page is hidden from screen readers
WCAG 1.3.1 A
-
A dropdown has no label
WCAG 4.1.2 A
-
Large tables have cells without headers
WCAG 1.3.1 A
-
Some scrollable areas cannot be used with a keyboard
WCAG 2.1.1 A