style.speak (Property)

Part of the aural style control suite that defines whether the content should be spoken out loud or not.

Availability:

CSS level - 2
DOM level - 2
Property/method value type:String primitive
JavaScript syntax:nonemyStyle.speak
CSS syntax:speak: aType
Argument list:aTypeA speech type

If the browser is equipped to utilize the platform's text to speech capabilities, this will cause the content of the element to be spoken out.

Realistically, the element must have some textual content to speak. The element is not going to make for a very interesting spoken phrase if it is an image, although the ALT text of the image might be used if it is defined.

The kind of speech is controlled with these keywords:

The none keyword inhibits the text to speech capabilities.

The normal keyword reads the word as best it can. Sometimes this might use phonetic rules to pronounce the word and this may sound strange.

The spell-out keyword forces the content to be read out one letter at a time. This may be more helpful if there are complex words that the phonetic rules don't cope with very well, or if the content is a formula or other kind of algebraic expression. This may also be useful for abbreviations or acronyms.

Warnings:

See also:Aural style sheets