Accessibility Certified – Home

3.1.1 Language of Page

The main language of every page is set in code, so screen readers, translation tools and browsers handle the text correctly.

Level APrinciple 3: Understandable

What does it mean?

Each page must state its main language in the code, usually with the lang attribute on the <html> element. Screen readers use it to pick the right voice and pronunciation. Browsers use it for hyphenation, spell checking and translation offers.

This applies to every page, including error pages, PDFs exported as web pages and pages built by a shop system or CMS. If your site has several languages, each language version needs its own correct value. Use a valid language code such as "en", "de" or "fr".

Who does it help?

  • Blind people using a screen reader, who otherwise hear English text read with a German accent or the reverse
  • People who rely on automatic translation in the browser
  • People with dyslexia or reading difficulties who use text-to-speech tools

Common failures

  • The <html> element has no lang attribute at all
  • A German page still says lang="en" because the theme or template was never changed
  • An invalid code such as lang="english" or lang="ger"
  • The language switcher changes the text but the lang attribute stays the same

How we test it

  • axe-core Automatic: axe-core finds typical violations. A violation is pre-filled as “fails”.
  • evidence Evidence: our scanner collects material such as screenshots, lists and measurements.

Test question: Is the page language set correctly in <html lang>?

A person decides every criterion. No criterion ever passes automatically.

How to fix it

Problem
<!doctype html>
<html>
  <head><title>Our services</title></head>
Better
<!doctype html>
<html lang="en">
  <head><title>Our services</title></head>

The lang attribute tells every tool which language the page is written in.

Practical tips

  • Check the setting in your CMS or shop system once; it usually applies to all pages.
  • A region code like "en-GB" is allowed but not required.

Official source

Understanding WCAG 2.2 at the W3C: 3.1.1 Language of Page

How does your website do on this criterion?

The free check tests your home page automatically; the audit decides all 55 criteria.

Free checkAll criteria