Loading Developer Playground

Loading ...

Skip to main content

Success Criterion · WCAG 3.1.1

Language of Page

The default human language of each Web page can be programmatically determined.

Level AWCAG 2.0Understandable3.1 · Readable
Copy button ready

Goal

Ensure assistive technologies can use the correct language rules for the page.

What to do

Set the default human language of each page (e.g., using `lang` on the root element).

Why it matters

Screen readers, translation tools, and spell checkers need the page language to pronounce and interpret text correctly.

Success criterion

What WCAG 3.1.1 requires

Summarized directly from the official Understanding document so teams can quote the requirement accurately.

The default human language of each Web page can be programmatically determined.

Intent

Why WCAG created this requirement

  • Language metadata enables correct pronunciation, braille translation, and dictionary selection.
  • This is foundational for multilingual sites and mixed-language content.
  • It improves automated translation and indexing.

Benefits

Who gains when you pass

  • Screen reader users hear correct pronunciation and language switching behavior.
  • Braille users get correct contractions and translation tables.
  • Users with cognitive disabilities benefit from more accurate speech output.

Why it matters

User impact when this criterion fails

Summaries drawn from the Understanding document help you socialize impact statements with product stakeholders.

Screen readers may mispronounce words if the language is not declared.

Braille output may be incorrect when language rules are unknown.

Translation tools may choose wrong defaults.

Overview

Every page must declare its primary language so assistive technologies can select correct pronunciation and processing rules. Commonly this is done with `lang` on the `<html>` element.

  • Set `lang` on the root element for each page.
  • Ensure the language code matches content (e.g., `en`, `en-US`, `es`, `fr`).
  • Single-page apps must update language if locale changes.

Reference: All summaries and highlights originate from Understanding WCAG 3.1.1 and the W3C quick reference.

Fast facts

Conformance level
Level A
WCAG version introduced
WCAG 2.0
Principle
Understandable
Guideline
3.1 · Readable

Examples

Make success tangible for teams

Share pass/fail snapshots to coach designers, engineers, QA, and content authors.

English page

Pass

<html lang="en">…</html>

Fail

No `lang` attribute set on the page.

Spanish page

Pass

<html lang="es">…</html>

Fail

<html lang="en">…</html> for a Spanish-only page.

Evidence to keep

Document conformance decisions

Capture artifacts for VPATs, procurement reviews, and regression testing.

  • Document supported language tags and how they map to locales.
  • Capture a sample of page source showing the `lang` attribute for audits.

Official resources

Deep dives and supporting material

Keep these links handy when writing acceptance criteria or responding to audits.

Implementation checklist

Capture progress and blockers

  • Set the document language on each page/template.
  • Ensure locale routing or language toggles update the `lang` attribute.
  • Verify server-rendered pages output correct `lang` value.
  • Document supported locales and their language tags.

Testing ideas

Prove conformance with evidence

  • Inspect the DOM and confirm the root element has a correct `lang` value.
  • Use a screen reader to verify pronunciation is appropriate for the language.
  • Switch locales (if available) and confirm `lang` updates accordingly.

Related success criteria

More from Readable (3.1)

View all criteria