AgenticWebScore
Scan

Content · Recommended

Language declaration and multilingual access

The lang attribute names the language of the text. WCAG 3.1.1 requires it at level A. Google reads hreflang, not lang.

  • Scored check
  • Web standards
  • Recommended
  • Adopted standard

Standard status Adopted. A ratified standard with real deployment. Standards: WCAG 2.2 and BCP 47.

Kind
Scored check
Part of the score
Web standards: 70% of the score. A check in it can hold a level.
Module
Every site
Who reads it today
Screen readers and translation tools. Google ignores the lang attribute and reads hreflang.
Effect on Google Search
Indirect. Google Search reads something this affects, such as the rendered page, but no Google feature reads it directly.
Language declaration and multilingual access — Property, Value
Property Value
Check idlang
DimensionContent
PartWeb standards
TierRecommended. Counts its weight once.
Weight1
MaturityAdopted. A ratified standard with real deployment.
Publishing skilllanguage-declaration
StandardsWCAG 2.2, BCP 47

Sources

What is measured

The scanner reads the lang attribute of the homepage's <html> element, every <link rel="alternate" hreflang>, and any <meta http-equiv="content-language">. Pass when lang is a well-formed BCP 47 tag, such as en or pt-BR, and either no alternate is declared, or every alternate has an absolute href and one points at this page's URL or is in this page's language. A missing x-default alternate is a note, given only when 2 or more languages are declared, and costs nothing. Partial when lang is empty or malformed while another declaration exists, when an alternate has a relative or missing href, or when no alternate refers to this page. Fail when the page declares no language at all.

Reproduce it yourself

You do not have to take our word for any of this. Run the same measurement against your own domain:

              HOMEPAGE=https://example.com/
curl -sSL -A 'AgenticWebScore/0.3 (+https://agenticwebscore.com/bot)' -H 'Accept-Language: en' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,text/plain;q=0.8,*/*;q=0.7' "$HOMEPAGE" | perl -0777 -ne 'print m{<html\b[^>]*\blang=["\x27]?([^"\x27\s>]+)}i ? "html lang=$1\n" : "html lang: none\n"; while (m{<link\b[^>]*\bhreflang=["\x27]?([^"\x27\s>]+)[^>]*>}gi) { my ($hl,$tag)=($1,$&); my ($h)=$tag=~/\bhref=["\x27]?([^"\x27\s>]+)/i; print "hreflang=$hl href=", ($h // "MISSING"), "\n" } print "meta: $&\n" if m{<meta\b[^>]*http-equiv=["\x27]?content-language[^>]*>}i'
            

The fix

This is an example written for example.com. Where the scan can build the fix from your own site, the report shows that version instead.

              <html lang="en">
<link rel="alternate" hreflang="en" href="https://example.com/">
<link rel="alternate" hreflang="de" href="https://example.com/de/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">
            

Standards referenced

  • WCAG 2.2
  • BCP 47

Related checks

Related checks — Check, Kind, Maturity, Same skill
Check Kind Maturity Same skill
markdown-negotiation — Markdown content negotiationScored checkExperimental—
headings — Semantic heading structureScored checkAdopted—
meta — Title and descriptionScored checkAdopted—
jsonld — JSON-LD structured dataScored checkAdopted—
faq-schema — FAQ markup for visible questionsUnscored checkAdopted—
breadcrumb — Breadcrumb markup on an inner pageUnscored checkAdopted—
no-js-fallback — Content that needs no JavaScriptScored checkAdopted—
spa-fallback — Per-page content separation (no SPA fallback)Scored checkAdopted—