Reply to this topicStart new topic
> alt="xxxx" - isn't really "alternative",

Centenarian Poster

Group: Members
Joined: 18-October 02
Posts: 159
From: Sussex, UK
post Jun 30 2004, 04:15 AM
When I add alt to an image it always appears - it seems really to be *additional* rather than *alternative*.

Can I set it up so that it is a genuine alternative, ie so that people who see the image don't have to also read my description of it?

Alan ..............
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 31-August 02
Posts: 15,634
post Jun 30 2004, 05:35 AM
I read one place something someone called the telephone test. If you were describing the page to someone over the phone, and you got to the picture, what would you say about it. That's the alternative.

I'm not exactly sure what you mean by a "genuine alternative", but normally people won't read the alt text if they can see the image, unless they hover over it.
Offline Go to the top of the page

Centenarian Poster

Group: Members
Joined: 18-October 02
Posts: 159
From: Sussex, UK
post Jun 30 2004, 05:54 AM
By "genuine atlernative" I was meaning that one should appear (img or alt text), not both.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 31-August 02
Posts: 15,634
post Jun 30 2004, 06:01 AM
You could use alt="" if you wanted, and it's recommended that you do that for spacer images and images that really are purely ornamental.

But I'm not sure why you wouldn't want to include the alt text for images in the absence of the picture appearing. If the picture is there, people won't see it unless they hover over the image.
Offline Go to the top of the page

Moderator

Group Icon
Group: Moderators
Joined: 29-August 02
Posts: 5,751
From: Bristol, UK
post Jun 30 2004, 07:10 AM
Alan, do you mean the little tooltip that pops up when you have the mouse hovering over an image?

If so, thats an IE bug effectively. The alt text is the text that should be displayed if the image is not. Hence it being alternative.

If you have a look in Opera, you will see alt text does not appear as a little flyout, instead in Opera (which does this technically more correctly) that action is prompted by the title attribute instead.

If thats not what you mean, then I don't really know what you are getting at.
Offline Go to the top of the page

Moderator

Group Icon
Group: Moderators
Joined: 6-March 03
Posts: 7,962
From: Langley, British Columbia, Canada
post Jun 30 2004, 07:29 AM
If you check a web page in Mozilla Firefox, you will see exactly the same treatment as in Opera. Alt texts do not show if the image is being displayed. Titles on images do show, since they are an accessibility feature for those who have a problem seeing the image, even though it is being displayed.

As Adrian said, unfortunately IE, which is used by the majority of surfers, handles this in the wrong way. There's not much you can do to correct this IE fault.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 7-November 02
Posts: 6,179
From: New England, USA
post Jun 30 2004, 07:43 AM
Yup. IE pretty much blows. The "alt" attribute comes from the olden days of the web. When it started out, modems transferred data at 300 bits per second. By the time Netscape hit the scene, though, the norm was 2400 (and 9600 was not too far down the road) but it was still very slow going when images were involved. Compression wasn't nearly as good and Compuserve's new GIF format was about as small as you could get. About 60K for a 320x240 image.

So, Netscape came equipped with a handy toggle switch that allowed you to "turn off images" when browsing. And, of course, the alt text was what showed when you were running in that mode.

Netscape and opera still handle images this way (but as pointed out, they will show the text on mouseover). So, back in the day, the attribute did make sense.

I know it doesn't really help ya, but figured the background info may be interesting.

G.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 11-February 04
Posts: 5,892
From: Los Angeles, CA
post Jun 30 2004, 02:57 PM
QUOTE(Bill)
You could use alt=\"\" if you wanted, and it's recommended that you do that for spacer images and images that really are purely ornamental.

I use images for ornamental reasons (alt=""). Everytime I run my page through an HTML validator, it says my "alt" text is missing and I've made an 'error.'

I don't think this is a big deal, but wouldn't mind hearing other views on it.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 31-August 02
Posts: 15,634
post Jun 30 2004, 05:13 PM
That's odd, Garrick.

I used the W3C validator to check this page, and got the same response you did:

http://www.utexas.edu/research/accessibili...decorative.html

But, the W3C are the ones who say that is valid html, and the right way to do it:

http://www.w3.org/TR/html4/struct/objects....s.html#adef-alt

QUOTE(The W3C)
Do not specify irrelevant alternate text when including images intended to format a page, for instance, alt=\"red ball\" would be inappropriate for an image that adds a red ball for decorating a heading or paragraph. In such cases, the alternate text should be the empty string (\"\"). Authors are in any case advised to avoid using images to format pages; style sheets should be used instead.


I use it because if someone uses a screen reader, if they don't have anything for alt text, then the screen reader will read the file name. If it's n empty string, the screen reader will move on past it.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 11-February 04
Posts: 5,892
From: Los Angeles, CA
post Jun 30 2004, 08:42 PM
Sorry, Bill. Completely my fault. You're right. Been a while since I came across that error and recollection was not correct. On the decorative images, I completely left the alt attribute out completely (as opposed to alt=""), which of course was causing the error I was thinking of.

Is this a big deal, leaving it (alt) out completely on these type of images?
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 31-August 02
Posts: 15,634
post Jun 30 2004, 10:49 PM
No problem.

The W3C validator did call it an error though, on the page I tested, even though it's their recommendation and standard.

The place where it may have the most drastic impact is with a screen reader, which will read the name of the file, letter-by-leter, over and over on a site that uses dozens of spacer gifs, like this:

h-t-t-p-:-/-/-w-w-w-.-e-x-a-m-p-l-e-.-c-o-m-/-i-m-a-g-e-s-/-s-p-a-c-e-r-.-g-i-f

After the second or third time, I suspect that becomes mind-numbingly boring.

I've seen suggestions that failing to include alt tags also slow the rendering of a page. It could be true, but I can't tell you that for certain.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 11-February 04
Posts: 5,892
From: Los Angeles, CA
post Jun 30 2004, 10:52 PM
Great. Thanks, Bill.
Offline Go to the top of the page

Lead Technical Administrator

Group Icon
Group: Admin - Top Level
Joined: 23-January 03
Posts: 1,995
From: Michigan USA
post Jul 3 2004, 06:58 PM
QUOTE
I used the W3C validator to check this page, and got the same response you did:

I ran that same utexas.edu page through the validator, Bill, and like you, received an error. It wasn't, however, the same error Garrick is claiming. Instead of saying the alt text is missing, the error indicated Line 26, column 107: there is no attribute "ALT"

And they're right, I think. Checking the source code, line 26 is a <td> tag with a background assigned. The alt attribute assigned to that tag (presumably applying to the background image?) is wrong and doesn't even make any contextual sense. No screen reader is going to describe background images any way.

I ran a few other pages with alt="" applied to <img> tag and received no errors.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 31-August 02
Posts: 15,634
post Jul 3 2004, 08:08 PM
Thanks Ron,

It was difficult to tell with the code that showed on the W3C validation page. I assumed that the writer of a page about accessibility would know better, and didn't delve deeper into why the validator was making such an error.

Here's the summary view, when the validator is run:

QUOTE
Line 26, column 107: there is no attribute \"ALT\"

...sibility/graphics/greybarbg.gif\" alt=\"\">


Here's what we see on that line when we have the outline printed out, too:

QUOTE
26:  <td width=\"100%\" background=\"http://wwwtest.utexas.edu/research/accessibility/graphics/greybarbg.gif\" alt=\"\">


Good catch Ron smile.gif
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 11-February 04
Posts: 5,892
From: Los Angeles, CA
post Jul 8 2004, 01:01 PM
Other than the omission of alt="" for these ornamental images creating a validation error, is there any real harm to not correcting it? The pages seem to display fine to without it.
Offline Go to the top of the page
Reply to this topic Start new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Jump to Forum:
 
Lo-Fi Version Time is now: 9th February 2010 - 05:56 PM
Meet our Moderators: cre8pc : projectphp : sanity : Black Phoenix : bwelford : EGOL : Ruud : rustybrick : AbleReach : swainzy : joedolson: eKstreme: dazzlindonna : SEOigloo: iamlost : RisaBB
Cre8asite RSS Feed