Skip to content

Support for speak-as property to control aural presentation #114

Closed

Description

@alexlehner86

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:

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).

Activity

  1. jensimmons commented on Aug 22, 2022

    @jensimmons
    Contributor

    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-as could 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.

  2. alexlehner86 commented on Aug 23, 2022

    @alexlehner86
    Author

    @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

  3. foolip commented on Sep 16, 2022

    @foolip
    Member

    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.

  4. added
    focus-area-proposal
    and removed on Sep 16, 2022
  5. gsnedders commented on Sep 16, 2022

    @gsnedders
    Member

    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.

  6. added this to the milestone on Sep 16, 2022
  7. alexlehner86 commented on Sep 16, 2022

    @alexlehner86
    Author

    @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.

  8. foolip commented on Sep 20, 2022

    @foolip
    Member

    @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?

  9. changed the title [-]Support for speak-as property to control aural presentation - for Interop 2023[/-] [+]Support for speak-as property to control aural presentation[/+] on Sep 29, 2022
  10. moved this to Proposed in Interop 2023on Oct 7, 2022
  11. removed this from the milestone on Oct 7, 2022
  12. LJWatson commented on Oct 24, 2022

    @LJWatson

    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.

  13. zcorpan commented on Oct 24, 2022

    @zcorpan
    Member

    @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#24

  14. gsnedders commented on Oct 24, 2022

    @gsnedders
    Member

    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.

    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 the speak-as property in the cascade, which ends up without VoiceOver having the property, etc.

  15. LJWatson commented on Oct 25, 2022

    @LJWatson

    @gsnedders wrote:

    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 the speak-as property in the cascade, which ends up without VoiceOver having the property, etc.

    Ah. That would make sense. Thanks Sam. Any chance of talking with you/others about better/more support for CSS Speech in Webkit?

  16. nairnandu commented on Feb 1, 2023

    @nairnandu
    Contributor

    Thank you for proposing speak-as for 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions