HTML lang attribute is set
Why it matters
The lang attribute on the <html> element is the primary signal search engines use to serve your page to the correct language audience. Without it, Google may incorrectly categorize or exclude your content from language-segmented search results, reducing organic reach in your target market. Screen readers depend on the lang value to select the right pronunciation engine; an absent or wrong language code causes WCAG 2.2 SC 3.1.1 (Language of Page) to fail, potentially exposing your product to accessibility compliance liability.
Severity rationale
Low because incorrect language declaration rarely causes functional breakage but does reduce SEO precision and introduces an accessibility compliance gap that compounds across all pages.
Remediation
Set the lang attribute on the root <html> element. In Next.js App Router this lives in app/layout.tsx:
// app/layout.tsx
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
Use a valid BCP-47 code ("en", "en-US", "fr-CA", etc.). For multilingual sites, set the primary language at the root and use per-route lang overrides or hreflang link tags to signal alternate locales.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the SEO Fundamentals Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- wcag:2.2 · 3.1.1 — Language of Page
Taxons
History
- 2026-04-18·v1.0.0·Initial import from seo-fundamentals·automated