W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 1998

Re: alt tags no with a twist

From: Colin F Reynolds <colin@nospam.demon.co.uk>
Date: Wed, 19 Aug 1998 10:09:00 +0100
Message-ID: <Gdy5bMDsYp21EwMR@the-net-effect.com>
To: w3c-wai-ig@w3.org
In article <199808182129.PAA42181@einstein.physics.utah.edu>, John T.
Whelan <whelan@physics.utah.edu> writes
>       I agree that the use of ALT as tooltips regardless of the
>TITLE tag hurts the web coming and going by 1) making sensible ALT
>text look stupid as a tooltip and 2) causing people to define
>tooltip-oriented ALT text which makes no sense in a text browser, like

... or rendering ALT=" " as an empty tooltip, as commented by the
original poster in this thread.


>  But wouldn't a sensible strategy be:
>       1) If TITLE="", no tooltip;
>       2) If TITLE is anything else, use that as the tooltip

Makes sense so far. Except that if the image is a hyperlink, the
Anchor's TITLE attribute should be used, since the tooltip is likely to
be used to indicate navigation help.

>       3) If no TITLE, but ALT, use the ALT as a tooltip

NO. ALT was always intended as ALTernative content, NOT supplementary

>       4) If neither TITLE nor ALT, use "[IMAGE]" as a tooltip (since
>IMGs without ALT are wrong anyway)

I do not understand this at all. If the image is rendered, why interfere
with it by overlaying a tooltip which... tells you that an image is

>That way, authors would provide ALT and then override it with TITLE if
>it made a bad tooltip.  

But the problem is *caused* by encouraging people, through development
of browsers which display the ALT attribute as a tooltip, to think of
ALT text as tooltip text. Remove the encouragement and the problem goes
away: encourage TITLE text as tooltip.

>Sometimes a sensible ALT also functions fine
>as a TITLE.


>  For instance, some images carry essentially non-textual
>information, and the only reasonable ALT is something like ALT="[Photo
>of the White House]".  Also setting TITLE="Photo of the White House"
>seems redundant.

If it's considered too onerous to duplicate the text, perhaps what's
required is a special case; if it is considered that ALT and TITLE are
served equally well by the same text, to avoid duplication of the text,
how about using 

  <IMG SRC="foo.gif" ALT="foo" TITLE="ALT"> ?

The UA could still use TITLE for the tooltip, but could pick up on the
fact that the text to be used is to be found in the ALT attribute.

This allows for a sensible ALT as alternative text (with NO tooltip),
and for the provision of alternative text and an identical content
tooltip, where that is deemed necessary.

>       Also, I'm not sure how one would get around the problem of
>viewing ALT text for IMGs whose WIDTH and HEIGHT make them too small
>for the ALT to fit, or for that matter for images that are already
>loaded.  Perhaps that information could appear in a right-click menu.

This is a matter for the GUI UA to resolve. Opera, for example, has
managed to deal with it well, by ignoring width/height if image loading
is disabled. After all, these dimensions are ATTRIBUTES of the image. If
the image isn't present, they're irrelevant.

But then it depends upon whether you view HTML as a page layout language
or not. It's clear that some do: but I would have thought that the move
to CSS would help to discourage such a view.

>(Since people who want to see the ALT text when the images are already
>loaded are probably rare.)

Exactly my point (why provide ALT as tooltip?).

Best Wishes
Colin Reynolds, The Net Effect (World Wide) Ltd
Tel: +44 (0)1246 450 901
Fax: +44 (0)1246 450 902
Received on Wednesday, 19 August 1998 05:09:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:01 UTC