Forum Moderators: phranque

Message Too Old, No Replies

Correct use of ALT Tag?

For "Spacer" Images..

         

andmunn

4:47 pm on Mar 18, 2005 (gmt 0)

10+ Year Member



Hello All,

Whats the correct use of the ALT tag if it's just a "Filler image" - for example, a spacer, some kind of "header graphic", "border", or something of that nature?

Should i just leave the alt text blank (i.e// alt="") or should i specifiy it such as alt="spacer".

Just curious.
Andrew.

benihana

4:49 pm on Mar 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



spacer images? crikey....

id leave the ATTRIBUTE as =""

Ben

encyclo

5:55 pm on Mar 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you should just leave it as
alt=""
- otherwise, screenreaders will read out the word "spacer" every time. Also, if you surf with images switched off, the alt text would show, which is not desireable for a spacer image.

andmunn

7:00 pm on Mar 18, 2005 (gmt 0)

10+ Year Member



Ok.
Thanks - i assumed as much.
Andrew.

monkeythumpa

7:44 pm on Mar 18, 2005 (gmt 0)

10+ Year Member



Who uses .gif spacers anymore?

Metaphorically

11:30 pm on Mar 18, 2005 (gmt 0)

10+ Year Member



I'm sure people have their reasons. Not me, but people. Anyhow, I just happened by this point-form list of Section 508 (Accessability) requirements that covers exactly your question:

[508as.usablenet.com...]

jorj

8:42 am on Mar 19, 2005 (gmt 0)

10+ Year Member



I use gif spacers pretty often. I am also using cells with empty content such as <TD height='4'></td> but for some reason (habit, historycal) I prefer adding a spacer between.

Rule " Spacer IMG with valid ALT" : "[..]have a valid alternative description as an ALT attribute. An image is a spacer if one of its sizes is equal to 1 or if its URL contains the words "spacer" or "bullet".

To me it seems inappropiate to have an ALT for spacers. I know the HTML standards request it but they did not think to spacers when they created the specifications of IMG tag.

Tell me: how many of you use ALT attribute for ALL images of their pages?And how can a spacer img (or others alike, like arrows, bullets,etc) be consider as meaning something in the context of the page?

benihana

12:13 pm on Mar 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



be consider as meaning something in the context of the page?

hence the need for the null alt attrib, basically its saying this image means nothing.

without the null attributes, screen readers would speak the word 'image' but not give any further information. Very frustrating for users of aural browsing software as they do not know if its an important piece of content thats had its attrib missed, or a purely 'decorative' thing.

Same for those with images switched off / text only browsers.

Ben

jorj

12:21 pm on Mar 19, 2005 (gmt 0)

10+ Year Member



Look to the diffrence between IE and FireFox when treating images: IE (dumb) puts a 50x50px area instead of the missing image where FireFox just ignore it. That's how a null (missing) attribute should be taken care of.