WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Help on approach for annotating images

for

From: Joshue O Connor
Date: Dec 2, 2005 4:20AM


Christian Said:

>I'd venture to say that in this day and age, decorative images should
>be backgrounds in CSS and not IMG elements at all.
>
IMO This approach has a certain currency. I am curious to see what
others think.

Inserting decorative graphics via CSS using something like

#image {background: transparent url(../assets/pretty_border.png) left
no-repeat;}

has the effect that the image is completely invisible to a non sighted
user. It is not included in the source code and as it is a decorative
image, it has no informational value, and certainly no tangible worth to
a blind user.

However, you cannot apply alt text to background elements in CSS. So for
any images that you need to apply suitable alt text to, include them in
your source code in the traditional manner using <img>.

Josh


Christian Heilmann wrote:

>>This should be no problem; alt="" is the only reasonable way (or, in
>>some cases, alt=" " or, if the decoration actually appears as a separator
>>too, alt="|" or something like that).
>>
>>
>
>Wouldn't a " " alt make screen readers read out "image space" instead
>of just skipping them?
>I'd venture to say that in this day and age, decorative images should
>be backgrounds in CSS and not IMG elements at all.
>
>
>--
>Chris Heilmann
>Blog: http://www.wait-till-i.com
>Writing: http://icant.co.uk/
>Binaries: http://www.onlinetools.org/
>
>
>
>
>
>
>