How valid is it to have a null alt?
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 is there to describe the image, for when it fails to download or the viewer is visually impaired. Alt text is an accessibility concern and shouldn't be sacrificed for a design.
FYI - search engines index the information in the alt tags, especially Google.
Good Luck -
* My screen resolution is set at 1680x1050
* I'm accessing your site through a T1 line
* I'm probably viewing it using Firefox (unless browser is specified)
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.
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.
Originally Posted by Centauri
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.
To fix the bug in IE so that the alt text doesn't appear define an empty title attribute.
<img src="myimg.gif" width="100" height="200" alt="description of the image to display if the image isn't displayed" title="">
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.
Originally Posted by felgall
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)