Prev | Current Page 207 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"


Null alt attributes are unfortunately not interpreted correctly by all screen readers; some,
upon discovering a null alt attribute, go on to read the image??™s src value. A common
workaround is to use empty alt attributes, which just have blank space for the value
(alt=" "). However, the null alt attribute has valid semantics, so it should be used despite
some screen readers not being able to deal with it correctly.
Alternatively, try reworking your design so that images without meaning are applied as
background images to div elements, rather than placed inline.
Using alt and title text for tooltips
Although the W3C specifically states that alt
text shouldn??™t be visible if the image can
been seen, Internet Explorer ignores this, displaying
alt text as a tooltip when the mouse
cursor hovers over an image, as shown in the
adjacent example.
Internet Explorer users are most likely accustomed
to this by now, and, indeed, you may
have used alt text to create tooltips in your
own work. If so, it??™s time to stop. This behavior is not recommended by the W3C and it??™s
also not common across all browsers and platforms.
If you don??™t have access to screen-reading software for testing alt text and various
other accessibility aspects of a website, either install the text-based browser Lynx, or
run Opera in User mode, which can emulate a text browser.
WORKING WITH IMAGES
135
4
If an image requires a tooltip, most browsers display the value of a title attribute as one.


Pages:
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219