More on appendix B

I think it may be appropriate to extend 
appendix B to "how to insert images and 
 provide a text alternative". This is because 
images can be inserted in different ways: IMG, OBJECT,
and stylesheets, and the choice is not trivial.

I propose as a very first draft:

* Navigation bars.

1. Attempt to use separate images for links rather than image maps.
2. the alt of an IMG serving as a link, the content of an OBJECT, 
or the alt of AREA should be 
as if you were writing a text navigation bar.

* decorative images:

1. If possible, use stylesheets. background properties
in CSS allow to place an image without tiling it. This may be used for 
inserting a decorative image that appears on all pages of a website 
in some corner.

2. If stylesheets cannot be used, use IMG with a null alt text.

* list item bullets of unordered lists:
1. 
Markup the bullet list with UL and LI.
Use the list-style property in CSS. you may insert different bullets
in a list by using classes.

2. "deprecated" method:
  markup the list as a definition list DL and the items as DD. use IMG to insert the 
graphical bullet. use alt="Item:"
Note: This method may not render optimally in all media. E.g., a self voicing 
browser may generate the statement "item description" before each 
item, in addition to speaking the alt text.
To avoid this kind of problems use method 1 above.

* horizontal rules:
1.Use the HR element. Use background properties of CSS. Provide text with 
the title attribute of the HR.

2. Use OBJECT with HR as its content:
 <OBJECT data="rule.gif" type="image/gif"><HR title="End of example"></OBJECT>

3. "deprecated" method: Use: IMG. write alt text in the same way you would have 
written a title for HR.

Note: current browsers may have some bugs with 1 and 2 above, but these 
methods are preferable for the long run, since the rule is 
markuped correctly with HR.

* Images that convey important and vital info.
If the site consists mainly of images, e.g., a photograph collection,
use IMG with alt for short description and longdesc for a full description.

If it is an ocasional image such as a chart, you may do as above 
or use OBJECT with the content as the full description. In this case short 
description is not needed (or use title ?). 


* Large first letters in a paragraph etc.: 
1. Use style sheets.
2. Deprecated: use IMG with the letter being the alt text. 

* creating white space:
1.Use stylesheets whenever possible. 
2. Deprecated method: 
Use spacer images. Use IMG with null alt, alt="" or alt="&nbsp;", 
depending whether extra space is needed when rendered without images.
However, *never* break a word with spaces or spacer images, 
here styleshetts are required.

Note:  I think that the HTML4.0 spec recommends not to use 
empty alt, i.e. alt=" ".
In http://www.w3.org/TR/REC-html40/types.html#h-6.2 we find:

"User agents may ignore leading and trailing white space
 in CDATA attribute values (e.g., "   myval   " may be 
 interpreted as "myval"). Authors should not declare 
 attribute values with leading or trailing white space."

Regards,

Nir Dagan                            
Assistant Professor of Economics      
Universitat Pompeu Fabra
Barcelona (Spain)

email: dagan@upf.es
Website: http://www.econ.upf.es/%7Edagan/

Received on Friday, 17 April 1998 10:08:44 UTC