Skip to content
Pandus

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

Standards
StandardClause
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

WCAG success criterion

Guides and tools

Help articles

All rules we check