WebAIR

Do you specify the language of the webpage (e.g. English, French etc.)? (TXT22)

Why is this important?

It is important to specify the language of a webpage. This is because many assistive technologies, such as screen readers, or braille translation software, rely upon the specified language of the webpage to trigger the appropriate delivery. For example, a screen reader that identifies that a webpage is in French, will adapt to the pronunciation and syntax of that language. Defining the language of a webpage can also be useful for dictionaries that are built into the browser.

How to fix the problem

Specify the language of a webpage by providing the "lang" and/or "xml:lang" attribute on the <html> element.

Example

//Specifying the language of the webpage is English, using the "lang" and "xml:lang" attribute of the <html> element

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

Further Information

  1. https://www.w3.org/International/questions/qa-html-language-declarations