data
data copied to clipboard
CSS seems to be missing "speak"
Here's where the CSS standard is defined:
https://www.w3.org/TR/CSS21/aural.html#speaking-props
It's missing the following:
.foo{
speak: none;
speak: normal;
speak: spell-out
}
This seems to be the latest revision. pause
, cue
, rest
etc. are missing too. Not sure which browsers supports these properties though.
Yeah, even caniuse.com couldn't help on this. I know for sure these are used for Text-to-Speech and voice readers. Maybe Microsoft Edge, since there's Cortana integration.
Edge and Firefox doesn't seem to know speak
or any other of the CSS Speech properties. Chrome however knows speak
. But some values refers to the speak-as
spec, not the official speak
. I've no clue why, if this comes from an early spec or if it's a bug.
If it's from an earlier spec, I guess it's a bug, since it's not detecting the right word?
Since Chrome has it, maybe Firefox and Edge should have it?
The only thing I would wholeheartedly agree on, is to get more people to discuss, so we can all have differing ideas.
Adoption seems to be pretty wide-spread: https://caniuse.com/?search=speak
Some update on this issue?
I've dug a little into this topic.
Specifications
There are actually two different definitions for speak
. In CSS 2.1 (and CSS 2.2) it is defined as
normal | none | spell-out | inherit
And in CSS Speech 1 it is
auto | never | always
CSS Speech 1 additionally defines a speak-as
property which has the following values
normal | spell-out || digits || [ literal-punctuation | no-punctuation ]
Additionally, CSS 2 has this note at the top of that section:
This chapter is informative. UAs are not required to implement the properties of this chapter in order to conform to CSS 2.2.
and CSS Speech 1 says this:
The CSS Speech module is a re-work of the informative CSS2.1 Aural appendix ... it doesn't actually define the corresponding properties.
This makes CSS Speech 1 the official specification for speak
and related properties.
Implementations
Chromium based browsers obviously recognize a speak
property which seems to be a mixture of both speak
and speak-as
, and by that are not compliant with the specification.
Furthermore, none of the browsers I've tested (on a Windows desktop machine) actually supports the property natively, that means they either don't have a reader mode at all (Chrome 89, Opera 74) or their reader mode doesn't interpret the values (Edge 89).
Firefox doesn't recognize the speak
property at all. What it does support, though (according to the compatibility table) is the speak-as
descriptor of the @counter-style
rule. I couldn't find a proper test case to verify that, though.
Also, I don't know whether Safari supports speak
. Maybe someone else could test it.
So, as far as I can see it, none of the main (desktop) browsers actually supports the speak
property natively at the moment. Aside from browsers themselves, external screen reader software might interpret a specified speak
or speak-as
property.
Conclusion
Pages for speak
and the other CSS properties should probably be created as they are part of the web standards. Though they don't seem to be supported by any browsers, probably just by dedicated screen readers.
Sebastian
@cmxl wrote:
Adoption seems to be pretty wide-spread: https://caniuse.com/?search=speak
Some update on this issue?
None of the entries on caniuse.com actually refers to the speak
CSS property, only to the mentioned speak-as
descriptor of the @counter-style
rule or JavaScript APIs. And for those there are already pages on MDN web docs (to which caniuse.com even links to).
Sebastian
@SebastianZ guessing currently the suggestion is to just avoid using speak
until everyone settles on an implementation?
@OmgImAlexis Well, as I wrote earlier, screen readers might interpret it properly, though I have no experience with them. Browsers still need to fix or add their implementations related to the speak
property and the speak-as
descriptor.
For what it's worth, I've just created a few issues for Chromium and Firefox:
- Add
speak
property to Firefox: https://bugzil.la/1748064 - Add
speak-as
property to Firefox: https://bugzil.la/1748068 - Make
speak
in Chromium spec. compliant: https://crbug.com/1283584
I also found a few related issues:
- Add
speak-as
descriptor to@counter-style
rule to Chromium: https://crbug.com/1166766 - Add
spell-out
value tospeak-as
descriptor of@counter-style
rule in Chromium: https://crbug.com/1247764 - Add
spell-out
value tospeak-as
descriptor of@counter-style
rule in Firefox: https://bugzil.la/1024178
Happy New Year to you all!
Sebastian