CSS Speech Module Level 1

As I noted yesterday, screen readers don’t convey the semantics of many HTML elements like strong or em.

When I shared my post on Mastodon, Stéphane Deschamps chimed in and pointed to an promising candidate recommendation fresh from the press that might give authors much more control over how screen readers handle their content: CSS Speech Module Level 1.

Please bear in mind that this is still only a so-called W3C Candidate Recommendation Draft. This means that it is not a standard (yet), nothing of this is available in any browser as of today, and a lot of things might still change before any browser implements any of those features.

Still, it is worth to have a first look at what is being discussed at the W3C. And because the process is quite open these days, you can also provide feedback if you want.

Reading through the document, you’ll encounter a few really exciting properties that might one day find their way into CSS.

Auditory Styles

The voice-volume property, for example, allows authors to control the volume level of the speech synthesizer with keywords like ‘x-soft’, ‘soft’, ‘medium’, ‘loud’, ‘x-loud’ – or adjust the volume by a certain decibel value.

With the speak property, you’ll be able to declare whether or not a piece of text should be read at all using keywords like ‘auto’, ‘never’, or ‘always’.

Where it gets really interesting is the speak-as property. With the ‘spell-out’ keyword, text will be spelled one letter at a time. ‘digits’ will make the screen reader speak numbers one digit at a time. And with ‘literal-punctuation’ or ‘no-punctuation’, you can control whether or not semicolons, braces, and so on are named aloud. Really useful, not only for product, brand, or band names.

There are many more interesting properties that let you insert pauses, for example, or playback auditory cues before or after an element. And you will even be able to adjust voice characteristics like age or gender with the voice-family property and the voice-rate at which voice is spoken in words per minute.

Overall, this looks like a really exciting new draft of a document of which the first version, as I realized, was published more than ten years ago. It is great to see that editors like Léonie Watson and Elika Etemad (fantasai) are now working on this again. Let’s hope that this time, also with the growing awareness for accessibility in Corporate America and the EU, enough momentum can be gained so that many of those properties make it into browsers as soon as possible.


18 Webmentions

Photo of @tink
@matthiasott I hope to have @tink speak about it sometimes this year at https://css.cafe 🤞; Home - CSS-Cafe
Photo of @Schepp
@Schepp That would be amazing!