Fix "Invalid page language code" in HTML
Why it's a problem
The lang attribute on <html> tells screen readers which voice and pronunciation rules to use. A code that does not exist (“en-ENG”, “english”, a typo) is as good as none: the text may be read with another language's pronunciation.
How to fix it — HTML
Use a valid language code: “en”, optionally followed by a region (“en-GB”, “en-US”). Also check the code matches the content's language, especially on a multilingual site.
<html lang="french"><html lang="fr">
<!-- ou avec la région : -->
<html lang="fr-FR">RGAA criterion 8.4 — Éléments obligatoires
Pour chaque page web ayant une langue par défaut, le code de langue est-il pertinent ?
How to check: official tests (in French)
Test 8.4.1
Pour chaque page web ayant une langue par défaut, le code de langue vérifie-t-il ces conditions ?
Le code de langue est valide ;
Le code de langue est pertinent.
Full page for criterion 8.4 · Official text: Référentiel général d'amélioration de l'accessibilité (RGAA) 4.1, DINUM, Licence Ouverte 2.0.
Check your site in 30 seconds
Conformly detects this kind of issue across all your pages, continuously, and alerts you on every regression.
Free scan