Accessibility support for CSS generated content – Tink – Léonie Watson

Accessibility support for CSS generated content
29th of March 2015

  • Code things

The CSS before/after pseudo-selectors can be used to insert content into a page. In some situations this technique is a useful thing to do, but how do browsers and screen readers handle the generated content?

Quick recap: The before/after selectors insert content either before or after an element’s existing content. For example the CSS shown below will insert “bar” immediately after the “Foo” that is already present in the HTML:

Code language
CSS

Copy to clipboard

#a:after { content: ‘bar’; [...]

Read article at tink.uk

Article Taxonomies

Categories: Terms: , , , , ,