• 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

<html>

Why it matters

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

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.

<html lang="en">

The lang attribute tells screen readers which pronunciation and language rules to apply to the whole page.

Outcome

On a survey tool's question builder, this barrier is gone for screen-reader users who need correct pronunciation — they can finish what they came here to do.

Who is affected

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

Learn more