Guideline 4: Clarify natural language usage
Specifying the primary language and changes in language help search engines classify content by language. Multilingual visitors using assistive technologies also benefit. If language changes are clearly identified in the document, speech synthesisers and Braille systems are able to switch to the new language. Visitors unfamiliar with the language may use translators to translate the meaning for them. Expanding abbreviations and acronyms also helps search engines determine keywords, and makes the document more usable for visitors who may be unfamiliar with the terminology.
This guideline has 3 checkpoints, ranging in importance from Level "A" (essential for the site to be accessible), to Level "AAA" (beneficial to ensure the accessibility of your site).
4.1 Clearly identify changes in the natural language of a document's text and any text equivalents
This checkpoint is a priority 1 checkpoint. It must be satisfied for your site to be considered accessible. You should identify any changes from the primary language in the document using the "lang" attribute in HTML, and the "xml:lang" attribute in XHTML. Doing so will be beneficial for visitors unfamiliar with the language and using translation software.
The language code consists of a 2-letter primary code, as defined by ISO639, and an optional sub-code following a hyphen.
<p>
(French)
A certain <span xml:lang="fr">je ne sais quoi</span>.
(US English)
Language can be <span xml:lang="en-us">colorful</span>.
(UK English)
Very <span xml:lang="en-gb">colourful</span>.
(Cockney)
His <span xml:lang="en-cockney">loafs up his kyber</span>.
</p>
4.2 Specify the expansion of each abbreviation or acronym in a document where it first occurs
This checkpoint is a priority 3 checkpoint, required for Level "AAA" conformance. You should expand the meanings of abbreviations and acronyms when you first use them. This helps visitors who are unfamiliar with the terminology. An abbreviation is any word that has been shortened. Hants is an abbreviation of Hampshire, and W3C is an abbreviation of World Wide Web Consortium. An acronym is an abbreviation that can be pronounced, such as RAM.
Abbreviations are expanded using the "abbr" element, and acronyms are expanded using the "acronym" element. The acronym element should only be used on words that are generally considered pronounceable. Some people pronounce SQL as, "sequel". Others spell out the letters, "S", "Q", "L". Ambiguous words should be marked up using the "abbr" element. Some browsers render these elements as a tooltip when you hover over the word.
<ul>
<li><abbr title="HyperText Markup Language">HTML</abbr></li>
<li><abbr title="Structured Query Language">SQL</abbr></li>
<li><acronym title="Keep It Simple Stupid">KISS</acronym></li>
</ul>
Accessify have a tool called Acrobot which can be used to generate acronyms and abbreviations automatically.
4.3 Identify the primary natural language of a document
This checkpoint is a priority 3 checkpoint, required for Level "AAA" conformance. You should specify the primary language for your documents. You can either set the language through the HTTP headers, or in your markup. To specify the language in your markup, use "lang" for HTML, and "xml:lang" for XHTML.
Specifying the Language with Markup
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb">
To specify the language through the HTTP headers, use the META element.
Specifying the Language with a META Element
<meta http-equiv="content-language" content="en-gb" />
Comments