Start scanning free

( Understandable / WCAG 3.1.1 )

lang and xml:lang do not match

This check maps to Language of Page. Use the guidance below to confirm the issue, understand who it affects and ship a fix.

Moderate Level A WCAG 3.1.1 — Language of Page

What’s wrong

The <html> element sets both lang and xml:lang, and the two disagree on which language the page is in.

Why it matters

When these conflict, different parsers and assistive tools can pick different values, so some users get the correct pronunciation rules and others don’t, inconsistently.

How to fix it

Set both attributes to the same language code, or drop xml:lang entirely if the document isn’t served as XML.

Before
<html lang="en" xml:lang="fr">
After
<html lang="en" xml:lang="en">

Learn more