Start here
Before you fix it: what this check means
Scavo checks the main language declared on the HTML element. This helps screen readers choose pronunciation; the scan does not verify the language of every sentence. Scavo reads `lang` (or `xml:lang` fallback) from the `<html>` element and validates format.
Why this matters in practice: checking the reported setting helps you keep the site working as intended.
Use this as evidence, not a final verdict. This result covers what the scan could observe at that time, not every page or visitor situation. Check the live site first. Open the published page and ask your developer to inspect the reported request or setting Make one controlled change. Set `lang` in shared base layout. Re-scan the same URL and compare the finding; check the feature yourself as well.
Background sources
TL;DR: The HTML lang attribute is missing, so screen readers use the wrong pronunciation rules and translation tools can't detect your language.
Screen readers use the lang attribute to select the correct pronunciation engine — without it, they apply default language rules that mispronounce words and ignore language-specific grammar. Browser translation tools also rely on lang to detect when to offer translation. It's a single attribute on the html element that takes 5 seconds to add.
What Scavo checks (quick version)
Scavo reads lang (or xml:lang fallback) from the <html> element and validates format.
Current logic:
Warning: no language attribute foundWarning: language value exists but format is invalidPass: valid language tag format detected
Accepted format is based on BCP 47 style patterns (for example en, en-gb, fr, es-419).
How Scavo scores this check
Scavo assigns one result state for this check on the tested page:
- Pass: baseline signals for this check were found.
- Warning: partial coverage or risk signals were found and should be reviewed.
- Fail: required signals were missing or risky behavior was confirmed.
- Info: Scavo could not gather enough reliable evidence on this run to score pass/fail confidently.
In your scan report, this appears under What failed / What needs attention / What is working for language_attribute, followed by Recommended next steps and Technical evidence (for developers) when needed.
- Scan key:
language_attribute - Category:
TECHNICAL
Why fixing this matters
Language metadata helps assistive technologies, translation systems, and browser processing behavior.
Missing or malformed language tags can reduce accessibility quality and international correctness.
If you are not technical
- Ask your developer to confirm
<html lang="...">exists on live pages. - Check localized versions use matching language tags.
- Ensure the value reflects real page language.
- Re-run Scavo and confirm pass.
Technical handoff message
Copy and share this with your developer.
Scavo flagged Language attribute (language_attribute). Please add/fix the root <html lang="..."> declaration using a valid BCP 47 language tag and verify localized routes use correct values.If you are technical
- Set
langin shared base layout. - Use locale-aware rendering for translated routes.
- Validate generated language tags from locale config.
- Keep
langsynchronized with actual content language.
How to verify
- View source and confirm
<html lang="...">on key templates. - Validate tags for locales (for example
en-gb,fr-fr,es-419). - Confirm no malformed custom codes are emitted.
- Re-run Scavo and confirm pass.
What this scan cannot confirm
- It does not validate translation quality.
- It does not verify full international SEO implementation.
- It checks format/presence, not semantic correctness of every phrase.
Owner checklist
- [ ] Assign owner for locale metadata in base templates.
- [ ] Keep locale-code mapping centralized.
- [ ] Add release checks for missing/invalid
langvalues. - [ ] Re-test after localization routing changes.
FAQ
Is xml:lang enough?
This check uses it as fallback, but standard lang on <html> should be present.
Can one site have different lang values by route?
Yes, and that is expected for multilingual sites.
Why does format matter?
Malformed tags can be ignored by tools that rely on standardized language codes.
What is the safest default for English-only pages?
Use an explicit value like en (or a region-specific variant if appropriate).
Sources
Need help mapping URL locales to valid language tags? Send support your locale config.