Re: IMG ALT attribute in HTML 4.0

Koga Youichirou (y-koga@ccs.mt.nec.co.jp)
Thu, 18 Sep 1997 12:28:23 +0900


To: www-html@w3.org
From: Koga Youichirou <y-koga@ccs.mt.nec.co.jp>
In-Reply-To: Your message of "Tue, 09 Sep 1997 16:00:59 -0400"
 <3.0.3.32.19970909160059.008d4c90@undergrad.math.uwaterloo.ca>
Message-Id: <19970918122823D.y-koga@ccs.mt.nec.co.jp>
Date: Thu, 18 Sep 1997 12:28:23 +0900
Subject: Re: IMG ALT attribute in HTML 4.0

Liam Quinn <liam@htmlhelp.com>:
> I was glancing over the recently updated Cougar DTD at 
> <http://www.w3.org/MarkUp/Cougar/Cougar.dtd> where I noticed that the ALT 
> attribute for IMG is now a required attribute (a good thing, IMO).

> With this in mind, I would suggest changing the DTD's comment to 
> "alternate text when image is not rendered".

I don't think it's a good idea. I think ``IMPLIED'' is a sufficient
condition as before because ALT means altenate text as you wrote
above. If there are no ALT attributes in <IMG>, user agents can know
there need not any alternate text for this image and it's sufficient.
But new HTML 4.0 draft botheres HTML authors those who decide
alternate text is not necessary to some images (e.g. images for
decoration) to fill with NULL text in ALT attribute.

BTW

I point out some curiousities about ALT for <IMG>.

B.5.1 says:

	When an author does not set the alt attribute for the IMG or
	APPLET elements,...

but now <IMG> requires ALT attribute and this condition never happen.

	user agents should supply the alternate text, calculated in
	the following order: 

	  1. If the title has been specified, its value should be used
	     as alternate text. 

Agree.

	  2. Otherwise, if HTTP headers provide title information when
	     the included object is retrieved, this information should
	     be used as alternate text. 

Which field of HTTP headers?

	  3. Otherwise, if the included object contains text fields
	     (e.g., GIF images contain some text fields), information
	     extracted from the text fields should be used as
	     alternate text. Since user agents may have to retrieve an
	     entire object first in order to extract textual
	     information, user agents may adopt more economical
	     approaches (e.g., content negotiation). 

This means all user agents must GET image datas when they fail 1 &
2. And this requires user agents to analyze image datas too. Really? I
think it's stupid.

	  4. Otherwise, in the absence of other information, user
	     agents should use the file name (minus the extension)
	     as alternate text. 

What is `file name'?

-- Koga, Youichirou <y-koga@ccs.mt.nec.co.jp>