Website Accessibility Guide

3.1.2 Language of Parts

Written by MCS Accessibility Team | Jun 8, 2020 10:56:00 PM

Understanding 3.1.2 Language of Parts

This guideline requires specification of language for html elements that use a different language than the specified language of the web page. When a change in language occurs, such as quotes or translations, assistive technologies and user agents can provide more accurate renderings when they're given a heads up.

The Official WCAG Guidelines recommend specifying any language changes by simply using lang attributes. 

  • Example 1: In order to practice his spanish, Waldo responded "Lo siento mi amigo Jeff." In response to this guideline, the HTML for this paragraph should specify the change in language:

    <p>In order to practice his spanish, Waldo responded, "<span lang="es">Lo siento mi amigo Jeff.</span>"</p>

  • Example 2: When a website has language variants, the links to those versions of the website should be written in the applicable language and the lang attribute should be specified. 

In addition to routine HTML elements, special attention should be given to the following:

  • Flash Content
  • PDF Documents
  • Silverlight Objects
 

Foreign words that become common in other languages do not need lang attributes (ex: rendezvous,  burrito).