Page MenuHomePhabricator

CSS Speech "speak" property generates error message in sanitized-css pages
Open, Needs TriagePublicFeature

Description

The CSS Speech Module Level 1 (CR draft, 14 February 2023) speak property is now flagged as "Unrecognized or unsupported property at line x character y." by css-sanitizer when attempting to save a sanitized-css page containing it.

The case at hand is s:Template:Header/styles.css. If I just edit that page and immediately save it I get the error message, because the speak property apparently worked on 22 January 2021 when it was first added to the page.

On pages with CSS content model (like [[Special:MyPage/common.css]]) it works fine. But any TemplateStyles page (i.e. sanitized-css) I tested I got the same behaviour.

Now admittedly my codesearch-fu isn't all that, but as best I can figure out this is due to rCSSSe3dc606034acc31771ffbb5d13d11bf84f2bb39f by @Anomie on 6 February 2022. According to the commit message that commit drops CSS Speech entirely because it is "obsolete", which I think must be a mistake. The old (2012) CSS Level 3 Speech Module was retired in 2018, but that was just the normal diffusion of CSS specs to replace it with CSS Speech Module 1 (which was current from 10 March 2020). At time of writing the 14 February 2023 CR draft is current, and just skimming the two versions suggests this is indeed just a revision rather than a completely new spec.

Event Timeline

Possibly relevant thread on MDN's Github.

I should probably also mention that the immediate use case here is speak: never to prevent voice browsers from speaking structural elements (that also has display: none).

The other fancy stuff the Speech spec enables would be nice, but 1) voice browsers do a pretty good job without such help AIUI, and 2) we have much more pressing a11y issues to fix before CSS Speech-tagging stuff makes sense. If grandfathering in speak: never as a stop-gap, and holding off on the rest until CSS Speech 1 gets to PR and/or gets somewhat stable implementations, is a quick fix I'll be happy short term. Longer term we should have full CSS Speech 1 support of course, but I don't currently have a real-life use case for that.

FYI, that patch was created in January 2020, after the CSS Speech Module was retired in 2018 but before the CSS Speech Module Level 1 was created in March 2020. It wasn't merged until February 2022 because no one else cared (and I was gone from WMF) until someone wanted something in one of the other specs being added or updated there and someone noticed the old patch still lying around.

I don't know who if anyone now maintains css-sanitizer. T322482#8577814 seems relevant though.

Izno changed the subtype of this task from "Bug Report" to "Feature Request".
Izno added a project: TemplateStyles.
Izno moved this task from Backlog to External (css-sanitizer) on the TemplateStyles board.