• Success Criterion 3.1.1
  • Conformance level A

Language Attribute Set to an Invalid or Malformed Value

3.1.1 — Language of Page

Scenario

Setting

A survey tool's question builder

What’s wrong

Invalid values: lang="english", lang="EN-UK", region codes malformed beyond recognition.

Example

This shows up on a survey tool's question builder: invalid values: lang="english", lang="EN-UK", region codes malformed beyond recognition.

Why it matters

Screen-reader users who need correct pronunciation, and tools that depend on language metadata. Here, on a survey tool's question builder, the result is they hear the wrong pronunciation throughout.

How to test

Check the html lang value against the ISO language code list: values like "english" or malformed region codes ("EN-UK") are invalid and fail.

How to fix

The <html> element must carry a valid lang attribute matching the page language, updated when the site language switches.

Outcome

After the fix, the same visitor to a survey tool's question builder can now hear the correct pronunciation.

Who is affected

Screen-reader users who need correct pronunciation, and tools that depend on language metadata.

Learn more