Alternative Text for CSS Generated Content | Adrian Roselli

Alternative Text for CSS Generated Content

October 13, 2020; 5 Comments

Relying on images that come from CSS has always been risky from an accessibility perspective. CSS background images, in particular, must either be purely decorative or be described to the user in some way.

The risk is no different for images coming from CSS generated content using content: url(foo.gif) (typically paired with ::before and ::after). Addressing it is often a bit trickier.

A long time ago using CSS generated content was a WCAG auto-fail. Today using content: to insert plain text can be a boon for users — from browsers using it to [...]

Read article at

Article Taxonomies

Categories: , Terms: , , , , , ,


5 stars; 93% of tests passed.
Level ALevel AALevel AAAUnique

Error data courtesy of

Read article at