R002: html[lang] missing, non-Arabic, or contradicting detected content
Screen readers choose a voice and search engines choose an index from <html lang>, so a missing or wrong tag gets Arabic content read aloud and ranked as another language.
The check
- Id
- R002
- Category
- Document and metadata
- Default severity
When it fires
The page is Arabic, but
<html>has nolangattribute or declares a language that is not Arabic, so screen readers and search engines have to guess.Fix: Set
<html lang="ar">(or ar-SA / ar-AE to match your market).medium confidence
<html lang>declares Arabic, but under 10% of the visible letters are Arabic and more than 200 are Latin: the page is really in another language, or its translation never shipped.Fix: Either translate the page or correct the lang attribute, a wrong declaration hurts SEO and assistive tech.
What it leaves alone
A regional Arabic tag like ar-SA or ar-AE, which counts as Arabic, and an Arabic lang on a page with 200 Latin letters or fewer, or at least 10% Arabic, where there is too little to judge.
Broken, then fixed
<html dir="rtl" lang="en">
<body>
<h1>نظّم عمل فريقك في مكان واحد</h1>
</body>
</html><html dir="rtl" lang="ar-SA">
<body>
<h1>نظّم عمل فريقك في مكان واحد</h1>
</body>
</html>Check it by hand
Run document.documentElement.lang in the DevTools console. An Arabic page prints ar or a regional tag such as ar-SA; an empty string means the attribute is missing.
What the report shows you
Each R002 finding carries the fields below that apply to it, so you can see why it fired without rerunning the scan.
- langAttr
- The
langattribute on<html>exactly as written, or nothing when it is absent. - detectionSignals
- When the declaration is missing or wrong: why the page counts as Arabic, from an Arabic
lang, anrtldir, or at least 40% Arabic letters in the visible text. - arabicLetterRatio
- When Arabic is declared but not used: the share of visible letters that are Arabic, from 0 to 1.
- latinChars
- Reported with the ratio: how many Latin letters the visible text holds.
More document and metadata checks
- document direction missing, contradicted, or declared only in CSS
- hreflang alternate set lacks any Arabic entry on an Arabic page
- <title> or meta description majority-Latin on an Arabic page
- OpenGraph/Twitter metadata untranslated or og:locale missing/invalid
- Canonical URL points at a different-locale variant
Does your page trip R002?
Paste a URL. Ritla renders the page on desktop, tablet and mobile, runs every check, and shows the top issues with screenshot evidence.
Scan a page freeBrowse the checks