CSS to speech: alternative text for CSS-generated content
Briefly

CSS to speech: alternative text for CSS-generated content
"The CSS ::before and ::after pseudo-elements are used to insert presentational content before and after (respectively) existing content in an HTML element. The content property is used to define what content is inserted in these elements. For example, the following CSS adds the text "Error: " before the content of an error message container: This example adds an SVG chevron icon to a button that toggles the display of some content:"
"CSS-generated content is not exposed in the accessibility tree of the page like HTML content is. But CSS content takes part in the accessible name computation of the element they are used on. CSS pseudo-content in the accessible name computation algorithm When the browser needs to determine the accessible name of an element, it uses an algorithm called " Accessible Name and Description Computation " algorithm."
The CSS ::before and ::after pseudo-elements insert presentational content before and after existing HTML element content. The content property specifies the content to insert. Examples include adding text such as "Error: " before a message container, embedding an SVG chevron via a data URL, and adding the ↗ unicode character to indicate external links. CSS-generated content does not appear in the accessibility tree like HTML content. CSS-generated textual content can contribute to an element's accessible name. The accessible name algorithm requires checking for CSS-generated textual content associated with a node and including it in the accumulated accessible name.
Read at Sarasoueidan
Unable to calculate read time
[
|
]