RE: title inclusion

All.

I think that the title= attribute is quite important, but I also think that
there are some guidelines on how it should be used for images and links.

I will try to outline the ways in which I use the alt and title attributes.
My reasons for using alt and title in this way are chiefly because of the
issues with screen readers and browsers already discussed in previous emails
to the list on this topic.

For images that are not used as link element content:
1. Use alt to describe the image.
2. Use longdesc with a "d" link to provide a longer description if required.
3. Generally do not use the title attribute for images.

For images that are used as part content for a link (e.g.. a link that
contains an image used as a bullet with text to describe the link).
1.  Use the alt attribute to describe the image (e.g.. alt="bullet")
2.  Use the title attribute for the link to describe the link.  This is
often the same text as the non-graphical link element content.   Screen
readers will then read the title, allowing the user to skip over links
without hearing "graphic, bullet..."  all the time.

Example:
	I would use:
	<a href="http://www..." title="WAI working group site"><img
src="dot-pt.gif" alt="bullet"> WAI working group site</a>

	I would not use:
	<a href="http://www..."><img src="dot-pt.gif" alt="WAI working group
site"> WAI working group site</a>
	The screen reader would read "WAI working group site" twice.

	I would also not use:
	<a href="http://www..."><img src="dot-pt.gif" alt="bullet"> WAI
working group site</a>
	The screen reader would read "graphic, bullet" before every link in
the list.

For images that are used as the sole content for link elements:
1. Generally use the alt attribute of the image to describe the function of
the link.
2. Generally do not use the title attribute for the image
3. May use the title attribute for the link, but generally would use the
same text as that used as the alt text for the image.

So if an image is used as a link and it has alt= text that describes the
function of the link, then it can be said that the link element content is
descriptive of the function of the link, just like when you have a text link
with an appropriate link name.  This does not demand the use of title= for
the link.

However, if a picture is being used as a link, and it is desirable to
describe the picture to the user through the alternative text, appropriate
alternative text that describes the image may not also describe the function
of the link.  In these cases, I use the title attribute in the link element
to describe the function of the link, which then allows me to use the alt
attribute in the image element to actually describe the image.

For me, the use of title= for links is all dependent on looking at the link
element content and deciding whether or not that content (text or image with
alt=) is descriptive of the link and appropriate as a link name or link
content.  If it is, then the title is not required, if it is not, then the
title= for the link is required.

For example, if the text that is used as link element content cannot, for
design reasons, be descriptive of the link, then you have a case where you
should use the title attribute to describe the link.  One example of this is
the "d" link that is used with longdesc.  Here you specify an additional
link with "d" as the link element content.  "d" is not descriptive, so the
title= attribute is used with text like "...description of image..."

Similarly, if you are using an image for a link, and that image (along with
it's alt text specified with alt=) is not descriptive of the link, then you
have another case where the link element content is not descriptive, and
thus the title attribute should be used.

I place a higher degree of importance on using alt= in the image element to
describe image links, suggesting that the title= attribute for links should
only appear in certain cases.  This is because:
1.  alt= is more widely supported than title= by different browsers,
especially older ones.
2.  When title= is used, screen readers often ignore the contents of alt=.
This is not so bad when title= is used to describe a link where the image in
the link element content has alt= text that describes the image and not the
link it is better to give screen reader uses functional information.
However, in many cases, you want the screen reader user to receive the alt=
text.

Hope this is useful.

Mat.


Mat Mirabella
Telstra Research
03 9253 6712

Received on Tuesday, 4 December 2001 17:56:18 UTC