Re: IMG ALT attribute in HTML 4.0

Liam Quinn <>:
> I was glancing over the recently updated Cougar DTD at 
> <> 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.


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. 


	  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 <>

Received on Wednesday, 17 September 1997 23:28:42 UTC