Accessibility standard requirements
3: Use Markup to Identify Changes in Natural Language
Previous All Requirements Next
If the page contains more than one language such as both English and
Spanish, or the page is written in a format for a Braille reader, use
appropriate markup (the LANG attribute) to alert the reader of this change.
(Reference: W3C:
4.1)
Rationale:
- Text intended to be read by Braille readers (software/hardware) must be identified with the LANG attribute so that the software will correctly substitute the appropriate key control codes for the user.
- Text spoken by a speech synthesizer uses the LANG attribute to properly translate text using the appropriate accent with proper pronunciation. If the language transition is not identified properly, the synthesizer will try its best to speak the words in the primary language it uses, thus, the French word for car, "voiture" would be pronounced "voter" by a speech synthesizer that uses English as its primary language.
Example:
A. How to add the LANG attribute:
<BODY> <P> ...Interpreted as English(or default language)...</P> <P LANG="es">...Interpreted as Spanish...</P> <P>...Interpreted as English again...</p> <P>...English text interrupted by<EM LANG="fr">some
French</EM>English begins here again...
</BODY>
Examples of language codes used with lang attribute:
- fr (French),
- de (German),
- it (Italian),
- nl (Dutch),
- el (Greek),
- es (Spanish),
- pt (Portuguese),
- ar (Arabic),
- he (Hebrew),
- ru (Russian),
- zh (Chinese),
- ja (Japanese),
- hi (Hindi)



