Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

speak-numeral

The speak-numeral property allows you to specify whether the browser should speak digits separately as numbers or as words. More importantly, numbers are often spoken in two distinct ways: as a value or as a sequence of digits. You can control the way the browser speaks numbers with the speak-numeral property.

For example:

p {speak-numeral: continuous}

You can set this property to digit or continuous.

Use digit if you want the speech browser to pronounce numbers separately. For example, 123 as one, two, three. Use continuous to pronounce numbers fully. For example, 123 as one hundred and twenty three.

By default, this property is set to continuous, meaning that the browser speaks numbers as a value. The sequence 468 would be spoken as "four hundred sixty eight" if you did nothing to intervene. This is fine if you really needed that value, but suppose it was really the first three digits of a telephone number? In that case, set the value of speak-numeral to digits to hear "four six eight."

Phone numbers are a good example of a character sequence that needs to use both the speak-punctuation and speak-numeral properties. Unless you intervene, a phone number like "468-1234" may be spoken as "four hundred sixty eight one thousand two hundred thirty four." To stop this happening, you could set up the following class :

.phone { speak-punctuation : code;
         speak-numeral     : digits}

In your page, use the class for the number:

<span class=phone>468-1234</span>

This makes the browser speak the number as "four six eight dash nine four seven four." Other content elements, such as addresses, license plates numbers, and other numeric values would be presented correctly using this style class.

Word representations are language-dependent.