views:

127

answers:

2

I've just been working on a page which needs to be accessible to both sighted and visually impaired users. Some elements of the content, just by the nature of relating only to visual elements, simply do not apply to people using screen readers. For example, a link opens an audio-visual presentation in a new window, but due to circumstances beyond my control, the window is awkwardly resized, so there's a message saying that you should resize the window so you can see everything better. Obviously this is useless information to someone who can't see it anyway.

Is there an accepted way to make screen readers ignore some content?

+6  A: 

Halfway through writing the question I remembered where to look.

CSS can do this:

<span class="dontRead">Screen readers shouldn't read this</span>

.dontRead {
    speak: none;
}
nickf
Probably goes without saying, but <link rel="stylesheet" type="text/css" href="..." media="aural" /> also improves targeting for screen readers.
Ron DeVera
Yet another time that i wish i could mod comments up. thanks for that tip. good question and answer too :) +1 to alll
Darko Z
+1  A: 

CSS has those aural properties, but as they aren't implemented anywhere they are completely useless.

NickFitz
surely screen readers would have implemented them..?
nickf
Screen readers never see the CSS - they simply look at what the browser (IE, or recent versions of Firefox) exposes through its accessibility interface, and browsers don't recognise aural styles :-(It's a common misconception that screenreaders are a kind of browser. In reality, they are operating system extensions, designed to read the output of many existing programs.(I noticed the other year that most of the bug reports on the website for Jaws, the most widely-used screenreader, related to its use with Excel and Word rather than web browsers, though this may have changed by now.)
NickFitz