Re: ToolTips: bug or feature?

On Mon, Jul 30, 2007 at 08:38:24PM -0500, Jon Barnett wrote:
 
> If I'm understanding correctly, your main point in this discussion is
> that MSIE should be free to present @alt as a tooltip if it chooses.
> You've iterated this point a few times now.
> 
> Instead, I suggest precisely the opposite.  HTML 5 should explicitly
> forbid @alt from being displayed as a tooltip*.  Also, @alt SHOULD not
> be presented to the user in any way by default when an image is being
> displayed - in the same manner that a UA doesn't display the contents
> of <object> if the media is being displayed.  Any other behavior
> encourages misuse of alternate content by encouraging authors to use
> @alt as supplemental, not alternate, content.

While I concur with this point of view and share the underlying concern, I
would weaken the prohibition somewhat: a visual UA must not present @alt at
all by default, but may (should?) do so if the default is overridden, such as
by a configuration parameter exposed appropriately in the UI.
> 
> * There is one exception to this.  Given <img src=404 alt=something
> width=100 height=100> some browsers will reserve a 100x100 box and
> display the @alt text inside that 100x100 box.  When the text doesn't
> fit in the box, some browsers display the @alt text in a tooltip, and
> this is fine: the alternate text is serving its purpose as an
> alternate for an image.

This is a good point.

Also, should the specification state, as currently drafted, that @title can be
used to provide a description of an image? Although it seems reasonable to
allow this, @title is strictly supplemental and may not be presented to the
user in the event that the image isn't rendered. Perhaps this should be noted
in the spec.

Cases such as <img src="image.png" alt="submit" title="red button"> should be
allowed, I think, but, for example, <img src="non-decorative-image.jpg" alt=""
title="description of image"> should at least be highly discouraged. (Note
that, currently, the absence of @alt is equivalent to alt="", and is also
non-conforming, as I read it, since alt is a required attribute.)

I am tempted to suggest that if @title has a non-null value, then @alt must
(or at least should) have a non-null value as well. If an image is
sufficiently important to deserve supplemental information (e.g., a credit or
a description) in @title, then surely it is sufficiently important to warrant
a fallback. However, it is conceivable that a purely decorative image,
deserving of the alt="" treatment, could still warrant a credit, for example,
or that an author may nonetheless decide to include a description,
notwithstanding  the fact that it is unlikely to be read. Thus, I think this
point belongs in usage guidelines rather than in the spec itself.

Received on Tuesday, 31 July 2007 06:50:25 UTC