Missing Lang Attribute on HTML Tags
WCAG Focus: WCAG 3.1.1 (A)
Screen readers rely on the root <html lang="…"> attribute to load the correct voice synthesizer and pronunciation rules. Without lang="en" (or the matching site locale), an assistive tool set to another default language may read English words with completely garbled phonetics.
Why This Pattern Violates WCAG
WCAG 3.1.1 Language of Page (Level A) requires the default human language of each web page to be programmatically determinable.
Code Comparison
Inaccessible Missing Root Lang Attribute
<html>
<head><title>Accessibility Guide</title></head>
Compliant Root HTML Lang Declaration
<html lang="en-US">
<head><title>Accessibility Guide</title></head>
How to Fix It in WordPress
- Ensure header.php uses WordPress’s <?php language_attributes(); ?> inside the <html> tag.
- Verify custom standalone landing-page templates do not hardcode a bare <html> tag.
Finding This Issue Automatically
Custom landing-page templates sometimes omit language_attributes() completely, breaking pronunciation for every screen reader visitor. The WP ADA Compliance Check plugin checks for valid language declarations and will automatically fix the issue by adding missing language attributes to HTML tags.
WCAG References & Supporting Materials
WCAG Success Criteria
Supporting Documentation & Guides
- W3C Technique H57: Using the language attribute on the HTML element — Declaring the primary document language on <html> via the lang attribute.
Subscribe
Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

