Skip to content
Barrierefrei²

Success criterion 3.1.1

3.1.1 Language of Page

Level AUnderstandable

So screen readers find the right voice.

1. What is the goal of this criterion?

The web connects people from all over the world – and with them, many languages. But what happens when a screen reader reads German text using English pronunciation rules? It sounds like someone reciting Goethe with a heavy American accent – and nobody understands a word.

The goal of WCAG Success Criterion 3.1.1 is clear: every page declares its main language in the code. That way, screen readers, browsers and other tools can load the right pronunciation rules, display characters correctly and present content in an understandable way.

In short: if your website is in English, computers need to be able to tell.

2. What exactly does it require?

The default human language of each page must be programmatically determinable. Specifically:

A clear language declaration: the main language of a page is set in the HTML – usually with the lang attribute on the <html> element.

Determining the main language: if a page uses several languages, the default language is the one used most. If several languages are used equally, choose the one that appears first.

Technical implementation: the language must be declared in a way that browsers and assistive technologies recognize automatically.

Exceptions: there are none – every page needs a language declaration.

A simple example: an English page uses <html lang="en">, a German one <html lang="de">, a French one <html lang="fr">.

If the language changes within a page, for example in a German quote, that’s covered by Language of Parts.

3. Why does it matter for accessibility?

Imagine you’re blind and visit an English website with a screen reader – but the page wrongly declares German as its language. The screen reader reads English words with German pronunciation rules. “Hello World” turns into gibberish.

Declaring the language improves accessibility because it:

  • supports screen readers: they load the right pronunciation rules and read text intelligibly.
  • helps browsers: characters and scripts are displayed correctly – especially important for other alphabets or writing directions.
  • improves media playback: media players can display captions correctly.
  • supports reading: people with reading or learning difficulties benefit from text-to-speech software that pronounces words correctly.
  • enables helper features: spell checking, automatic hyphenation in CSS and the browser’s translation offer all rely on the language declaration.

4. How to meet the criterion

The good news: declaring the language is technically simple – usually one line of code is enough. Here are the proven tips:

HTML basics:

  • Set the lang attribute on the <html> element: <html lang="en"> for English pages.
  • Use BCP 47 language tags in their shortest form: en for English, de for German, fr for French.
  • You can add regional variants: en-US (American English), en-GB (British English), de-AT (Austrian German).

For different document types:

  • HTML: <html lang="en">
  • XHTML served as XML: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">, and when served as HTML, add lang="en" as well
  • PDF documents: set the document language in the document properties; technically it ends up in the /Lang entry of the document catalog.

Multilingual websites:

  • Each language version gets its own declaration – on a bilingual website, en on the English pages and de on the German ones.
  • Make sure your CMS or framework sets the attribute correctly per language and doesn’t output the default value everywhere.
  • Mark language changes within a page as well (see 3.1.2).

Quality checks:

  • Test with a screen reader, such as NVDA or VoiceOver.
  • Check the source code or the browser’s developer tools.
  • Use automated tools like axe or WAVE – they reliably catch missing lang attributes, but not a wrong language.

Common mistakes to avoid:

  • Never leave out the lang attribute.
  • Don’t declare the wrong language, such as lang="en" left over from an English template on German pages.
  • Don’t use invalid codes – en, not english or eng.

5. Why this criterion matters for businesses

3.1.1 is part of WCAG 2.1 Level A and therefore part of EN 301 549, the standard behind the European Accessibility Act. In Germany, the EAA is implemented by the BFSG, which has applied since 28 June 2025 to online shops, banking services and other consumer services, among others. Public sector bodies must meet it as well. This section is general information, not legal advice.

1. A quick win

Hardly any criterion is easier to meet: one line of code, set once in the template. At the same time, a missing or wrong lang attribute is one of the issues automated testing tools flag immediately.

2. Better reach for international users

With a correct language declaration, screen readers, read-aloud features and browser translation work better. That improves the experience for everyone reading your content in a language other than their first.

3. A clean technical foundation

Hyphenation, spell checking in forms and typographic details depend on the language declaration. Accessibility isn’t a direct ranking factor – but a clean technical foundation also helps search engines process your content correctly.

6. The success criterion in the W3C’s words

Success Criterion 3.1.1 Language of Page (Level A)

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

In short: the main language of every page must be set in the code so that browsers and assistive technologies can recognize it automatically.

Official explanation from the W3C

The W3C explains every success criterion in depth – with intent, examples and techniques.

Understanding 3.1.1 (opens in a new tab)