Skip to main content
All rules

A11Y-019

Page language code is invalid

MediumDefault severity · Accessibility · Accessibility (WCAG 2.2 AA)

Last reviewed

What it checks

The <html lang> value against BCP 47 syntax (en, en-GB, pt-BR, zh-Hans).

Why it matters

Screen readers pick their voice from this code; an invalid value (en_US, english) makes them fall back and mispronounce text.

Recommended fix

Use a valid code such as lang="en" or lang="en-GB".

How to verify

View the page source and confirm the lang value.

Example fix prompt

Generic prompt (your report adds the evidence)
Please fix this production issue in my app.

Issue A11Y-019: Page language code is invalid
Site: https://your-app.example

First confirm the issue in the code or live config. If it is not present, say so and change nothing.
Task: Change the <html lang> value to a valid BCP 47 code (for example "en" or "en-GB"; use a hyphen, not an underscore).

Constraints: make the smallest change that fixes this, keep the current design and behaviour, never paste secret values into code or chat, and tell me which files you changed.
Done when: View the page source and confirm the lang value.

References