← Back to release summary

Alternative Text in CSS Generated Content

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 77)
Intent stage
Start prototyping

Summary

Currently there is no way to supply alternative text for CSS generated content. This change would allow alternative text to be supplied for elements that get their content from the content property.

Motivation

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 ignored for accessibility.

Standards & signals

Docs: n/a

Explainers: https://gist.github.com/alice/756caca028b2dae610e4ed5184c2f93e

View on chromestatus.com