A question on css content generation and accessibility

Am I right in stating that content created with CSS cannot be read by screen readers but content created with JavaScript can?

how do you create content with css?

I was referring to the content property:

h2:after {
content : " You can add content here";
}

Well, usually the CSS is considered ‘presentational’ in most circumstances. So it is unlikely they (screen readers) will actually read the generated CSS content because it is not really available via the DOM itself.

Some screen readers are, in effect, aural browsers - in other words, they take the raw HTML and any relevant CSS, and possibly scripts as well, and deliver an audio version of the page. As such, they may or may not read out CSS-generated content.

Some screen readers are just that - they sit on top of other software and read what’s on the screen - so if the browser you’re using supports generated content then the screen reader will read it out.

There is a wide range in the capabilities and functions of different screen readers. Asking “Can screen readers do…?” is a bit like asking “Can web browsers do…?”, quite often the answer will be “Some can, some can’t”.

Stevie D has it right, which is WHY I would answer “Wrong, they can do neither”

Because not all of them can do EITHER… and I develop for the lowest common denominator.

Bottom line, if it’s content, MAKE IT IN THE MARKUP. Javascript, flash, CSS generated content – you use those you’re rolling the dice on accessibility and you can pretty much guarantee it’s not going to work right SOMEWHERE!