Re: IMG ALT attribute in HTML 4.0

On 18 Sep 97, Koga Youichirou <y-koga@ccs.mt.nec.co.jp> wrote:

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

So use something like <IMG SRC="border.gif" ALT="Decorative Border">
to let users know the image is decorative. Since the image is purely 
decorative, in the future it can be defined using style sheets

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

Even though it shouldn't, it will because many authors never pay 
attention to the specs. Hence:

> 	user agents should supply the alternate text, calculated in
> 	the following order: 
> [..]
> 	  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?

Title:

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

Somewhat, but when bandwidth isn't a problem, it isn't as stupid.
Some formats such as GIF and PNG allow comments to be embedded
near the beginning of the file.

The problem I see is that suddenly pages with no ALT= text for their 
images will have bizarre messages like "(c) 1997 XYZ, Inc." or more 
embarrassingly  "FooBar Imagizer. Unregistered version." extracted from 
the comments.

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

The URL without the protocol, server, port, and path. So

  <IMG SRC="http://www.mysite.net/images/border.gif">

Would show up as

  "border"

Rob

 
---
Robert Rothenburg Walking-Owl (wlkngowl@unix.asb.com)
(Se habla PGP.) http://www.wusb.org/mutant/

Received on Thursday, 18 September 1997 16:36:52 UTC