Repository navigation
Description
Description
All browsers should support the CSS 'speak-as' property that allows authors to determine the aural presentation of content; e.g., how a screen reader should read it. For example, by setting the value 'digits' for a number, it will be read one digit at a time.
Specification
CSS Speech Module (speak-as property)
Tests
There are currently no web-platform-tests (on https://wpt.fyi) for the feature. I've manually tested the feature in Firefox, Chrome and Safari with the screen readers NVDA, VoiceOver and TalkBack. Only the combinations VoiceOver/Safari and VoiceOver/TalkBack on iOS worked.
Rationale
Numbers, abbreviations and equations can pose a challenge for screen reader users. Using the speak-as CSS property, authors could determine how text should be read to improve the user experience for screen reader users.
There are hundreds of relating questions on StackOverflow (I only include a few below) as well as several dev blog posts:
- https://stackoverflow.com/questions/60984996/screen-readers-not-reading-numbers-as-individual-digits
- https://stackoverflow.com/questions/60435580/force-screen-reader-to-read-numbers-as-individual-digits
- https://stackoverflow.com/questions/34090270/can-you-force-a-screen-reader-to-read-numbers-as-individual-digits/34092024
- https://css-tricks.com/lets-talk-speech-css/
- https://css-tricks.com/almanac/properties/s/speak/
- https://blog.joech.io/css-speech-module
- https://oidaisdes.org/spell-it-out-screen-reader.en/
At the moment, there are possible workarounds available to developers, where they use CSS and/or ARIA attributes to enforce a certain pronunciation. But these workarounds are insufficient and create severe accessibilty problems. Also, screen reader user should retain control over how content is pronounced (e.g. via verbosity settings).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsProposed
Activity
jensimmons commentedon Aug 22, 2022
Since Interop is a project that scores browsers based on the results of automated testing running on WPT infrastructure, do you have any suggestions for how
speak-ascould be tested by WPT and therefore be able to be considered for Interop 2023?Particular technologies can be incredibly important and compelling. But if they cannot be tested by WPT, then they cannot be part of the Interop 2023 score dashboard.
alexlehner86 commentedon Aug 23, 2022
@jensimmons Thanks for the quick reply. I could add several manual tests to the WPT repo. I just saw that there is already a sub folder for the CSS Speech Module: https://github.com/web-platform-tests/wpt/tree/master/css/css-speech
If I add several tests there and then link them in my original post here, would that be sufficient?
/edit: I've defined manual tests and created a pull request: web-platform-tests/wpt#35583
foolip commentedon Sep 16, 2022
Hi @alexlehner86! We just opened up for Interop 2023 proposals yesterday, see https://github.com/web-platform-tests/interop/blob/main/2023/README.md for the process and what to expect.
If this feature can only be tested manually, I think this could only be an Investigation Effort to add automated testing infrastructure. That would probably involve defining new WebDriver APIs and extending WPT to use it, somehow. Unlike a Focus Area where the responsibility is passed to browser vendors to pass the listed tests, and Investigation Effort would require someone to drive it to make progress.
If you're interested in defining an Investigation Effort, please let us know if you have questions.
gsnedders commentedon Sep 16, 2022
This basically already meets the focus area proposal template with enough written about the feature, so let's just label it as that. It might well be the case that we don't have sufficient testing for this to be accepted, but I think as a focus area proposal this is acceptable.
alexlehner86 commentedon Sep 16, 2022
@gsnedders Thanks for labeling my issue as a focus-area-proposal. To be honest, I don't know if the speak-as property could be covered by automated tests somehow. This would need to involve different screen readers and analyzing their auditory output. I don't know how to write automated tests for that.
foolip commentedon Sep 20, 2022
@zcorpan I know that Bocoup has done a lot of work on screen reader testing. Are you aware of anything currently that would allow automating the tests in web-platform-tests/wpt#35583?
[-]Support for speak-as property to control aural presentation - for Interop 2023[/-][+]Support for speak-as property to control aural presentation[/+]LJWatson commentedon Oct 24, 2022
Support for speak-as would be good, but there are several things that need to happen first - support for the speech media type, and support for other properties starting with speak.
I'd caution against thinking of screen readers as the primary audience for speak-as. The problems people want to solve with that property have already been solved by screen readers, and breaking user defined preferences is rarely a welcome experience. Thinking of web readers as the primary audience for speak-as (and the other Speech properties) ) stops CSS Speech from existing only as an accessibility module, and instead makes it useful to anyone wanting to design the aural experience of their content - which is a gorwing gap in the web platform IMO.
We'd also need better support for speak-as. It has partial support in Safari on iOS when using VoiceOver, but not when using Safari's web reader capability, so it's not clear how much of the implementation is in Safari and how much just in VoiceOver. We'd also need other independent implementations too of course.
So, much as I'd really like to see better support for CSS Speech emerge, I don't think we're quite a the point where all the pieces are in place - though I'm hopeful we can find sufficient interest in changing this.
zcorpan commentedon Oct 24, 2022
@foolip thanks for asking, and apologies for the delay. cc @jugglinmike @mzgoddard @howard-e
Automation for the ARIA-AT project is in progress, but not quite ready as a dependency for an Interop 2023 focus area I think. Further, currently the output is represented as a string of text without further detail about how that text was read (e.g. separated digits vs a number), so is not yet able to usefully test
speak-as. See w3c/at-driver#24gsnedders commentedon Oct 24, 2022
I would guess—and I haven't checked—that as part of the restyling of content for Reader mode we strip all CSS, including
speak-as, hence WebKit ends up rendering it without thespeak-asproperty in the cascade, which ends up without VoiceOver having the property, etc.LJWatson commentedon Oct 25, 2022
@gsnedders wrote:
Ah. That would make sense. Thanks Sam. Any chance of talking with you/others about better/more support for CSS Speech in Webkit?
nairnandu commentedon Feb 1, 2023
Thank you for proposing
speak-asfor inclusion in Interop 2023.We wanted to let you know that this proposal was not selected to be part of Interop this year. The features in this proposal aren't testable using automated web-platform-tests, so we were unable to consider it for inclusion in Interop 2023. This should not be taken as a comment on the technology as a whole.
For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023!
Posted on behalf of the Interop team.