luciash wrote:
Bruce Gilbert wrote:

I don't suppose there is a way to give an image an alt tag when you
are calling the image as a background in CSS is there? <div
id="image"></div> or is the rule of thumb, if the image requires an
alt tag, specify in the html??

TIA
it's no good way but you can try

<div class="image01"><span class="alt">Alternative text</span></div>

div#image01 {background-image: url("your_image.png");}
div#image01 span.alt {display: none;}

it'll behave in simmilar way to alt atribute of the img tag in text browsers...

This is NOT effective! Why go to all the effort of adding alt text in a non-standard way, and then hide it from the tools that need it most? Screen readers will hide the material marked display:none, defeating the effort.

See: http://css-discuss.incutio.com/?page=ScreenreaderVisibility
Also: http://www.access-matters.com/screen-reader-test-results/

The best answer is this. If the image is important to the content, and therefore requires ALT text, make it an HTML IMG and don't try to do fake things with CSS background images and unnecessary spans.

--
Bob Easton
Accessibility Matters: http://access-matters.com

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to