- Success Criterion 3.1.1
- Conformance level A
HTML Element Missing Its Language Attribute Entirely
3.1.1 — Language of Page
Scenario
Setting
A photo-sharing app's upload screen
What’s wrong
<html> lacking lang entirely. Example
<html>
<head><meta charset="utf-8"></head>
<body>
<div id="upload-dropzone">Drag photos here</div>
</body>
</html> Why it matters
Screen reader users on devices set to a different system voice than the app's content hear every upload instruction in a mismatched, hard-to-follow accent.
How to test
View page source: if the html tag has no lang attribute at all, it fails.
How to fix
Add lang as part of the base HTML template so it can never ship without it, since a missing attribute is invisible in visual QA.
<html lang="en">
<head><meta charset="utf-8"></head>
<body>
<div id="upload-dropzone">Drag photos here</div>
</body>
</html> Outcome
A user uploading photos hears clear, correctly paced instructions instead of a mismatched voice stumbling through them.
Who is affected
Screen reader users who need to move quickly through an upload flow get slowed down by speech that doesn't match the page's actual language.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- Page Published With No Language Declared in the Code
- Page’s Declared Language Not Matching Its Actual Content
- Language Attribute Set to an Invalid or Malformed Value
- Language Switcher That Doesn’t Update the Page’s Lang Attribute
- Language Attribute Set on the Body Instead of the HTML Root
- Multilingual Site Serving Every Locale With the Same Lang Value