Skip to main content

Module lang_consistency

Module lang_consistency 

Source
Expand description

Language consistency gate (v0.0.47 plan §2 item 1.5 / A5).

Per page, compares every JSON-LD inLanguage declaration against the page’s <html lang> attribute. The comparison is BCP-47 subtag-aware: only the base (primary) language subtag is compared, so inLanguage: "en-GB" on <html lang="en"> is consistent, while inLanguage: "en-GB" on <html lang="hi"> is a LANG-MISMATCH warning — search engines receiving two different languages for one document will trust neither.

Pages without a <html lang> (WCAG 3.1.1 covers that) or without any JSON-LD inLanguage produce no findings.

Structs§

LangConsistencyGate
Language consistency gate: JSON-LD inLanguage vs <html lang>.