Accessibility for Web Developers

Guideline 4

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).

Important - Priority 1 Checkpoint 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.

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>.
His <span xml:lang="en-cockney">loafs up his kyber</span>.

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.

<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>

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="" 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" />

Further Reading

You might also like...


About the author

Gez Lemon United Kingdom

I'm available for contract work. Please visit Juicify for details.

Interested in writing for us? Find out more.


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“God could create the world in six days because he didn't have to make it compatible with the previous version.”