Fix "Page language to verify" in HTML
Why it's a problem
With no declared language, a screen reader falls back to its default voice: French text read with English pronunciation becomes unintelligible. It is among the cheapest failures to fix and the most disabling to endure.
How to fix it — HTML
Declare the main language on the <html> element with a valid code (fr, en, de…). Mark passages in another language with a local lang attribute so the screen reader switches voice at the right place.
<html>
<body>
<p>Bonjour. Our <em>flagship</em> product…</p>
</body>
</html><html lang="fr">
<body>
<p>Bonjour. Notre produit <em lang="en">flagship</em>…</p>
</body>
</html>RGAA criterion 8.3 — Éléments obligatoires
Dans chaque page web, la langue par défaut est-elle présente ?
How to check: official tests (in French)
Test 8.3.1
Pour chaque page web, l’indication de langue par défaut vérifie-t-elle une de ces conditions ?
L’indication de la langue de la page (attribut
langet/ouxml:lang) est donnée pour l’élémenthtml;L’indication de la langue de la page (attribut
langet/ouxml:lang) est donnée sur chaque élément de texte ou sur l’un des éléments parents.
Full page for criterion 8.3 · 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