Main Menu

Welcome to the first edition of our monthly

Accessibility Tip

November 2005

Each month we would like to bring to you a tip on how you can improve the accessibility of your website. Each tip will contain details on a particular issue that faces people with disabilities, how it affects people and what you can do to resolve it.

This month we are looking at the issue of clarifying the natural language of a page or segment of text on your website.

The issue

People who are blind or have a severe visual impairment or who suffers from dyslexia may use a technology called "screen readers". This reads out a web page in a natural voice, making it easier to use. These screen readers are normally set to pronounce words using a set of rules that are applicable to the user's personal language preferences. When the user hits a new website the screen reader checks if there are any indications on the site of what language or pronunciation to use. If no language is specified then the screen reader will fall back on its default pronunciation, regardless of the actual language intended on the page.

What you can do

There are a number of things you can do to make it easier for the screen reader to use the correct pronunciation.

The first is to identify any changes in the language being used on the page, for example if your whole page is in English but there is a sentence or two in Maori. In HTML use the lang attribute to set the language for the paragraph. In XML use the xml:lang attribute.

<p><span lang="mi">Kia ora</span> to all the New Zealanders out there.</p>

"mi" is the official language identifier for Maori. You can find other language identifiers at http://www.w3.org/WAI/ER/IG/ert/iso639.htm.

The next thing you need to do is to mark up all abbreviations and acronyms using the <abbr> and <acronym> elements and including a title attribute.

<p>I always have trouble deciding when it should be a <acronym title="Three Letter Acronym">TLA</acronym> and when it should be an <abbr title="abbreviation">abbr</abbr>.</p>

Finally, identify the primary language used for a page. This can be done either in the <html> element, or as a HTTP header. It doesn't hurt to do both either:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-NZ" >
   <head>
      <meta http-equiv="Content-Language" content="en-NZ"/>
      .
      .
      .
   </head>
   .
   .
   .
</html>

More information

Braille uses certain contractions that may be confusing when applied to text in a different language. By specifying the language in your HTML code the Braille software can stop using the contractions for the span of text in question.

Another advantage is for a visitor who may not be able to identify the language themselves. They can use the language identifier to select an appropriate machine translator.

Marking up acronyms and abbreviations allows the screen reader to decide whether to pronounce the text as a word or to spell out the letters. It also allows the user to read the expansion (i.e. the title attribute) by hitting the key combination for their browser/screen reader.

Bruce Aylward, 01 November 2005

About W 3 A

W 3 A provides consultancy and audit services on information accessibility, focussing on Internet accessibility, compliance with the W3C standards and NZ Government Web Guidelines, and website best practice. We have relationships with several charities and government agencies responsible for the interests of the disabled.

Subscription Details

If this tip has been forwarded to you from a friend and you would like to subscribe to receive future editions directly then please use our online subscription form or send an email with subscribe as the subject and containing your name and email address to newsletter@w3a.co.nz.

If you would prefer to receive this newsletter in the Headstar Text Email Newsletter (TEN) format then please just let us know.

Other issues of the Accessibility Tip are available on our articles page.