Writing a replacement for a popup window, that uses a text box created with css, that "pops up" when you hover over a graphic. It all works great, except the alt text pops up along with the css text box containing my info. Anyway, the only way to get rid of the alt text box and avoid an html error is to have alt=""
But my question is, is this an acceptable thing to do? To set alt to null? Or is it better to just give up this line of thought and use the alt text to display my message?
The alt text SHOULDN'T pop up - this is incorrect behaviour by IE, and can be annoying. The title tag should be the only one that pops up (as in FF). The blank alt tag is quite common, and it is up to you whether accessibility or design is the major concern.
Thank you. Great set of answers!
Clearly if the alt text is not supposed to appear, I should not use it for critical information anyway. So, css is a better way to go. I think that setting the alt to null on this ocassion is acceptable.
...........The blank alt tag is quite common, and it is up to you whether accessibility or design is the major concern.
In the UK accessibility is every web designers concern under the DDA. In Australia, a site was fined for failing to provide alt tags. Such cases are rare. Nevertheless, in some countries it not just "up to you" to design for accessibility, as far as the law is concerned. And it seems that search engines favour the use of alt tags.
...........There should never be a need for an image with alt="" because that is basically saying that the image isn't needed for the page at all.
I believe that cosmetic images that are mere decoration should have alt="" . I also think there is a case for logos to have alt="" as well. As far as a reader is concerned, they are cosmetic. Leaving a null value for them spares a listener the tedium of hearing something like "company logo" on each page.