Success Criterion 3.1.1 Language of Page

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

WCAG Level
A
WCAG Versions
2.0
2.1
2.2

What the issue is

While the lang attribute is used in HTML to indicate the language of the page or parts thereof, XML-based documents, such as SVG or XHTML, should use the xml:lang attribute for this purpose. When xml:lang is missing, incorrect, or inconsistent with the HTML lang attribute in XHTML documents, it can lead to confusion for assistive technologies, affecting the document's accessibility.

What the issue is

There is a significant cognitive load as a blind screen reader user on arriving on a web page with content that is not in your language. A sighted user who is able to perceive the visual layout can quickly understand the situation and navigate to a language selector, should there be one. In comparison, a blind screen-reader user must navigate around a web page in a language they may not know, nor have expected, trying to find that language switcher.

What the issue is

When the lang attribute on the <html> tag or within the document contains incorrect, outdated, or non-standard language codes, it can lead to misinterpretation of the content's language by browsers and assistive technologies. This issue arises when developers use incorrect ISO language codes, making the content inaccessible or difficult to understand for users relying on technology that adapts the content based on language settings.

What the issue is

Automatic language detection inaccurately assesses the user's preferred language, leading to a webpage being displayed in a language the user cannot understand. This often occurs with websites trying to automatically set the language based on the user's location (via IP address) or browser settings, without allowing an easy way for the user to change the language back to their preferred choice.