CSS to speech: alternative text for CSS-generated content
September 23, 2025

While making an update to a course chapter that includes the use of CSS-generated content in the accessible name computation of an element, I noticed that browser support for providing alt text in CSS using the slash syntax has improved since I gave a talk about CSS and accessibility at CSS Day last year. So I thought it’s time to do a proper (long overdue) writeup. This is a 101 post on when and how to use the slash content property syntax in CSS to provide alt text for CSS-generated content, and why it is important.
Source: CSS to speech: alternative text for CSS-generated content
For years, we’ve been able to include generated content via CSS in our web pages, but this has not always been great for accessibility. Here Sara Soueidan looks at how we can now make this content accessible with relatively new features of CSS.