Chapter 8: Language

The language of each page must be specified in the markup. This will allow user agents such as browsers to render the content in the specified language. Further it allows the assistive technologies such as screen readers to interpret the language in which it has to speak out for the user.

The default language is the language in which the primary content is published. In some cases web pages may contain portions of the page in a language different from the default language of the page. A language attribute has to be specified for the content that is published in a non-default-language of the page. This will allow the screen readers to automatically change to the synthesizer and speaking rules of that language if it supports.

Validation of default language

Method 1: Paul Adam Bookmarklet

  1. Open the page you want to test in the browser.
  2. Apply Paul Adam’s language bookmarklet.
  3. The bookmarklet shows the language if it is specified.
  4. Reset the page using the reset bookmarklet.

Method 2: Using aXe.

  1. Open the page you want to test in the browser.
  2. Run the automation tool aXe.
  3. If the result screen does not show the error of 3.1.1, the success criteria is pass.

Method 3: Manual inspection

  1. Open the page you want to test in the browser.
  2. Open the source code. Usually the command is Control + u.
  3. In the HTML element the “lang” attribute must be available with appropriate value. E.g. lang=’en’ in case of English and lang=’fr’ in case of French .
  4. If this is provided the success criteria is pass, else not.

Note 1: In some cases instead of “lang”” XML language attribute i.e. xml:lang attribute may also be used.

Note 2: No page will have an instance where language of the page is not applicable. Only failure or pass will be applicable for this success criteria.

Validating language of parts

No automation tools can identify the content in a different language than the default one. Only manual inspection can verify this success criteria.

  1. Open the page you want to test on the browser.
  2. Read the entire content of the web page.
  3. Check if the page contains any content that is in a different language than the primary one.
  4. If available inspect the content using any browser inspecting tools.
  5. Check if the content that is in different language has a language attribute specified.
  6. If the language attribute is not specified, it is an accessibility violation.

Exceptions for language of parts

Proper names, Technical terms, words of indeterminate language and wordsor phrases that have become part of the vernacular of the immediately surrounding text can be exempted from 3.1.2 Language of parts.

WCAG Success Criteria

3.1.1 Language of page
3.1.2 Language of parts

Contact Us

Maxability Pvt Ltd Flat 360,
Block D2 SLS Signature Appartments,
Kaverappa Layout, Kadubeesanahalli,
Bangalore - 560103.

6366496664