What Is the Valid Language Code Violation?
Ensures the lang attribute of the element has a valid value.
| WCAG Criterion | 3.1.1 |
| Impact | critical |
| axe-core Rule ID | html-lang-valid |
| WCAG Principle | Understandable |
How to Fix Valid Language Code
Use a valid BCP 47 language tag in the lang attribute. Common valid values: "en" (English), "es" (Spanish), "fr" (French), "de" (German). Avoid invalid values like "EN-US" (use "en-US").
Run a free Accessalyze scan to find all instances of this violation on your site, with AI-generated fix code for each specific element.
🔍 Scan Your Site for Valid Language Code Violations →Who Is Affected?
The Valid Language Code violation impacts users who rely on assistive technologies including:
- Screen reader users (JAWS, NVDA, VoiceOver, TalkBack)
- Keyboard-only users who cannot use a mouse
- Users with cognitive disabilities who rely on clear structure
Approximately 1 in 4 adults in the United States has some type of disability. Fixing this violation improves access for millions of users.
Find Valid Language Code Violations on Your Site
Free scan in 30 seconds. Get the exact elements with this violation plus AI fix code.
🔍 Scan Free — No Signup