Intent to Implement: Alternative Text in CSS Generated Content

96 views
Skip to first unread message

Meredith Lane

unread,
Mar 12, 2019, 2:41:40 PM3/12/19
to blin...@chromium.org
mere...@chromium.org,abox...@chromium.org https://gist.github.com/alice/756caca028b2dae610e4ed5184c2f93e Specification: https://drafts.csswg.org/css-content/#alt In progress https://drafts.csswg.org/css-content/#alt This change allows for alternative text to be supplied for the content supplied using the CSS content property, to be used for non-visual mediums. The content property can be used to provide semantically important information to the user. Alternative text is used by assistive technologies to communicate the contents/caption of DOM content. This change would allow alternative text to be provided through CSS purely, making it available on pseudo elements like ::before and ::after, which are otherwise ignored for accessibility. It also allows for purely decorative elements to be explicitly labelled as such (by providing an empty string after the slash), and therefore still ignored for accessibility.
Syntax is not backwards compatible with the content property. See discussion: https://lists.w3.org/Archives/Public/www-style/2016May/0109.html Firefox: No public signals P3 bug filed for implementation, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1281158 Edge: No public signals Safari: Public support (https://bugs.webkit.org/show_bug.cgi?id=120188) Implementation of vendor prefixed version, uses an alt property rather than the optional slash syntax, but support exists for the concept. Web developers: Positive (https://twitter.com/rob_dodson/status/1090060058224803840)
Can use DevTools Style and Accessibility Panels, chrome://accessibility > Show accessibility tree Yes No Can’t be tested in WPT yet because WPT tests lack a mechanism to assert things about the accessibility tree, for now. https://www.chromestatus.com/features/4550056227110912

Rune Lillesveen

unread,
Mar 14, 2019, 10:44:31 AM3/14/19
to Meredith Lane, blink-dev
On Tue, Mar 12, 2019 at 7:41 PM 'Meredith Lane' via blink-dev <blin...@chromium.org> wrote:
Syntax is not backwards compatible with the content property. See discussion: https://lists.w3.org/Archives/Public/www-style/2016May/0109.html

I don't see this as a big issue. Existing content not accidentally using the extended syntax will work. An author can do:

  content: "text";
  content: "text" / "alt-text";

to support UAs with and without support for the extended syntax.

Reply all
Reply to author
Forward
0 new messages