Image alt attribute

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Image alt attribute

Post 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?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post 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?
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

What tag would you suggest? 'decoration', 'ignore me', ' '?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

If i recall correctly, from a screen readers point of view, you should use a asterix "*"
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post 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 :D

I'm in a very happy mood today :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Grim... wrote:I'm in a very happy mood today :)
Great! Eveybody smile! :D
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Image alt attribute

Post 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".
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

So alt="*" is not so good, then?
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

Yes. As far as I know, just leave the alt empty ("") for presentational (no-content containing) images.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I've been using blank alt attributes where neccessary for a while now ;)
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Stoopid standards.
Stoopid alt tags.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post 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).
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

(#10850)
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Fangs is brilliant.
Post Reply