Accessibility Recipes/Abbreviations

From DPWiki
Jump to navigation Jump to search

If you've ever tried listening to text through a screenreader, you'll have noticed how many things there are that we don't read out as printed. Screenreaders try to cope with this, but we can help a lot.

What to do and how?

Basically, whenever there is some abbreviated text item or symbol that may not be correctly read, you can mark it as an abbreviation and give the expanded form in the title attribute. For example:

In <abbr title="Saint">St.</abbr> Matthew's gospel, we read....
<abbr title="Second Chronicles 6">2 Chron. vi.</abbr>
The cost was <abbr title="1 shilling and sixpence">1s. 6d.</abbr>

Most browsers will by default underline abbreviations, or perhaps use small-caps. You can of course change this as you wish. For abbreviations that you feel sighted readers will know, it may be appropriate to remove all visual styling since screenreader users are the target audience.

 abbr { border:none; text-decoration:none; font-variant:normal; }

(If you remove styling, check in case any abbreviations occur in a passage that should be small-capped, say, and handle those individually.) Abbreviations that may not be well known, such as baseball positions(!), may be useful to sighted readers too, in which case some form of underlining alerts the reader that a tooltip expansion is available.

Another useful feature is to mark abbreviations that should be spelled out.

abbr.spell { speak: spell-out; }
<abbr class="spell">Ph.D.</abbr>

It is up to you to decide whether this would be better read as "P H D" or expanded as "Doctor of Philosophy".

Which Abbreviations Need This?

Good question. Some need full expansion, some would be better spelled out, and some are so common and specific that screenreaders already recognise them.

  • You don't need to worry about:
    • Mr., Mrs., Dr.
    • 1st, 2nd....
    • etc., i.e., e.g.
    • Large numbers (it knows how to read out 1884950, with or without thousands separator, in words.)
    • Fig. (at least with dot and a numeral following—it seems to know)
    • Some units of measure (experiment if you can).
  • You should consider marking up
    • St. (is it "Saint" or "Street"?), Rev. (Reverend or Revolutions?), perhaps Jr., Mme., Col.
    • 2d, 3d (used as 2nd and 3rd in old books)
    • &c.
    • Numbers that should be read digit by digit?
    • Some units of measure.
    • Roman numerals. (XVI read as "zvee" really isn't helpful!)
    • Most shortenings.
    • Abbreviations for U.S. states.
    • Symbols. × and ÷ seem to be ok, ½ seems to vary according to software and context. Exotic symbols definitely.

If possible, try listening to your text in some kind of screenreader and see which abbreviations it recognises.

How to find and mark them

This isn't easy. You can search for common ones, you can devise a regex that tries to detect them by the "abbreviation dots", or the unit ones by numbers before them, but to be really thorough needs a smoothread. Temporarily styling

abbr { background-color:mistyrose; }

or similar will help you to spot any that have been missed.

Guiguts can help you mark the Roman numerals using the following regex. Search \b([IVXLCDM]+)\b replace <abbr title="\C::arabic("$1")\E">$1</abbr>. Do similarly for the lower-case Roman numerals. Warning! Don't use Replace All: the regex will pick up words like I and mix etc. (You can remove some of the letters if you're sure there's no big numbers in your document.)

Note on ABBR and ACRONYM

There is a related tag <acronym>. There has been controversy over whether it should be used for true acronyms, or for initialisms of any kind, or whether <abbr> should be preferred. IE (6?) only supports <acronym> so <abbr> will have no effect (no styling, no tooltip). <acronym> will (according to current drafts) be dropped in XHTML 2 and in HTML 5.

Why?

W3C:

Is just the first occurrence enough? Controversy: see references below.

Who benefits?

Primarily screenreader users. If the computer says something incomprehensible (like "two kron vy" the user can usually hit a key to have it spelt out (2 C H R O N dot V I dot), but they can also hit a key to hear the title attribute if you have provided one. Good (non-free?) screenreaders such as JAWS can be set to only read the title attribute for text marked with <abbr>. For this reason, it is worth mentioning in your Transcriber's note at the top that abbreviations have been expanded in this way, so that JAWS users can switch to this mode of reading.

For unfamiliar abbreviations, sighted mouse-users can benefit from the markup via the tooltip effect of the title attribute. Some advocate always making this known by underlining, even for familiar abbreviations, to help those with learning or memory problems. (But remember that visual, keyboard-only users can't access the title attribute at all.)

Drawbacks

If a sighted user happens to trigger a tooltip for some really obvious abbreviation, it might seem a bit silly. If your document ends up really littered with abbreviations, then having tooltips jump up all over the place could actually hinder reading, especially for people with dyslexia.

Testing

Have a listen, if your screenreader is able to make use of the markup.

Further Reading

There's a lot of controversy out there!

It is worth noting that many argue for simply typing the expansion in brackets after the abbreviation for all to see, instead of using markup. Obviously this is not an option for us as transcribers of another author's work.