Digital Accessibility Index: Learn where the world’s leading brands fall short on accessibility.

See Report

WCAG 2.1 - SC 3.1.1 Language of Page

The default language (human, not programming) of the page content should be specified in the page so that user agents can figure it out. Usually, this is done via the lang attribute of the element. It lets screen readers load the proper pronunciation rules, and allows visual browsers to display characters more accurately.

Official Requirements:

3.1.1 Language of Page: The default human language of each Web page can be programmatically determined.

How to fix:

  • HTML pages (pages served as text/html) should use the lang attribute with the proper language value. For example, an English page would use <html lang="en">; a French page would use <html lang="fr">
  • XHTML served as text/html should use both the lang attribute and the xml:lang attribute. For example, an English page would use <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">; a French page would use <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">;
  • XHTML served as application/xhtml+xml should use the xml:lang attribute only. For example, an English page would use <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">; a French page would use <html xmlns="http://www.w3.org/1999/xhtml"  xml:lang="fr">
  • Language tags use a primary code to indicate the language, and optional subcodes (separated by hyphen characters) to indicate variants of the language. For instance, English is indicated with the primary code "en"; British English and American English can be distinguished by using "en-GB" and "en-US", respectively. Use of the primary code is important for this technique. Use of subcodes is optional but may be helpful in certain circumstances.
  • The Library of Congress has a list of Codes for the Representation of Names of Languages ; use the values in the ISO 639-1 Code column

Not sure where to start?

Start with a free analysis of your website's accessibility.

GET STARTED