Page 1 of 1
Image alt attribute
Posted: Fri Apr 07, 2006 3:47 am
by Grim...
If I've got a load of images that are used for decoration, and serve function for my site beside making it look pretty.
Should these images have an alt tag?
Posted: Fri Apr 07, 2006 3:56 am
by Maugrim_The_Reaper
Yes, per the XHTML standard. Offers an alternate text description (even if it is only a small decoration-only remark) for those not actually viewing the images. I certainly wish the alt was optional for decorative only images, but then your html will not validate - cost vs benefit?
Posted: Fri Apr 07, 2006 4:06 am
by Grim...
What tag would you suggest? 'decoration', 'ignore me', ' '?
Posted: Fri Apr 07, 2006 4:14 am
by JayBird
If i recall correctly, from a screen readers point of view, you should use a asterix "*"
Posted: Fri Apr 07, 2006 4:37 am
by Grim...
Excellent. I've always thought that adding alt tags to images that are used for decoration is more of a hiderance than a help to screen readers, so this cheers me immensely
I'm in a very happy mood today

Posted: Fri Apr 07, 2006 6:23 am
by Chris Corbyn
Grim... wrote:I'm in a very happy mood today

Great! Eveybody smile!

Re: Image alt attribute
Posted: Fri Apr 07, 2006 6:42 am
by Roja
Grim... wrote:If I've got a load of images that are used for decoration, and serve function for my site beside making it look pretty.
Should these images have an alt tag?
Yes. I generally use the blank alt tag:
<img src="blah.jpg" alt=""></img>
Anything but blank, and the screen readers will render it, or worse, announce it. Nothing quite as annoying as hearing "Az-ter-isk" 30 times on a page.
If you don't include the blank alt tag, the screen reader (depending on configuration) will announce the image as "blah dot jay-peg".
Posted: Fri Apr 07, 2006 6:49 am
by Grim...
So alt="*" is not so good, then?
Posted: Fri Apr 07, 2006 7:07 am
by matthijs
Yes. As far as I know, just leave the alt empty ("") for presentational (no-content containing) images.
Posted: Fri Apr 07, 2006 7:38 am
by Chris Corbyn
I've been using blank alt attributes where neccessary for a while now

Posted: Fri Apr 07, 2006 9:20 am
by Grim...
Stoopid standards.
Stoopid alt tags.
Posted: Fri Apr 07, 2006 2:33 pm
by Roja
Grim... wrote:Stoopid standards.
Stoopid alt tags.
Heh. Well, the alternative (pun intended!) is the old style - no alt tags anywhere, and images that were important - like graphical "Submit" buttons (a huge pet peeve of mine).
Imagine a form that has a submit button, but you can't see it or find it! Annoying is not the word.
Stupid, however, does fit nicely.
Alt tags for the win (even the empty ones).
Posted: Fri Apr 07, 2006 3:43 pm
by Christopher
Posted: Mon Apr 10, 2006 4:56 am
by Grim...
Fangs is brilliant.