Web Accessibility Best Practices

Campus Information Technologies and Educational Services (CITES) and Disability Resources and Educational Services (DRES)

University of Illinois at Urbana/Champaign

Language Changes in Web Resources

Marking up language changes is critical for screen readers and other speech renderings of web resources. Many speech synthesizers support mutliple languages and they need information on changes in language to switch pronounciations. When changes in language are not included, speech renderings become confusing and unintelligible, similar to the visual confusion that occurs when a character set is not available apparently random characters appear on the screen.

HTML Markup

:lang
The lang attribute can be used on almost all elements to define the intended langauge of the element's content. The two or five-character language codes used in HTML 4.01 can be found at [RFC1766]

Related Accessibility Requirements

Section 508

Web Content Accessibility Guidelines (WCAG 1.0)

Examples

English
This sentence is written in English
German
Dieses ist Satz ist auf Deutsch
French
Cette phrase est crite en franais
Spnaish
Esta oracin se escribe en espaol

HTML Source Code

<dl>
  <dt>English</dt>
  <dd lang="en">This sentence is written in English</dd>
  <dt>German</dt>
  <dd lang="de">Dieses ist Satz ist auf Deutsch</dd>
  <dt>French</dt>
  <dd lang="fr">Cette phrase est crite en franais</dd>
  <dt>Spnaish</dt>
  <dd lang="es">Esta oracin se escribe en espaol</dd>
</dl>