ALT text should be displayed as tooltip when TITLE is not available




15 years ago
15 years ago


(Reporter: Brian 'netdragon' Bober, Unassigned)



Windows XP

Firefox Tracking Flags

(Not tracked)



(2 attachments)



15 years ago
Discussion from bug 25537 seems to be something of a holy war but there appears
to be some middle ground:

The standards do not say that ALT text cannot be displayed as a tooltip when
TITLE is not available. It just says to display TITLE as a tooltip and not put
meaningless information in ALT. There are many cases where a webmaster might
want to do this, all discussed in bug 25537. This bug is not a dupe of bug 25537
and if you mark it a dupe, you didn't read this bug and seamonkeys will go to
your house and flog you.

The difference between this bug and bug 25537 is that this bug is about
displaying ALT tooltips ONLY when TITLE is not available. One example of when
this is helpful is:

<img src="images/demoticons/icon_smile.gif" style="color: blue;"
alt="::Smiles::" title="::Smiles::" >

I want ::Smiles:: to appear for a graphic called icon_smile.gif when the image
cannot be loaded. I also want a user to see ::Smiles:: when they mouseover in
case they don't know what the image means. This is not necessary for a smiley
emoticon because most people would know what it is. But for some other
emoticons, it might help to have that titletip. I have to put an identical alt
and title text, and in this case, it is appropriate. (This is why I decided to
finally file a bug on this)

"Non-text equivalents of text (e.g., icons, pre-recorded speech, or a video of a
person translating the text into sign language) can make documents accessible to
people who may have difficulty accessing written text, including many
individuals with cognitive disabilities, learning disabilities, and deafness.
Non-text equivalents of text can also be helpful to non-readers. An auditory
description is an example of a non-text equivalent of visual information. An
auditory description of a multimedia presentation's visual track benefits people
who cannot see the visual information."

This shows it is our responsibilty to display ALT text for accessibility
reasons, which provides a long description of an image, with meaningful

Yes, ALT text is meant as a replacement for an image if the image is not
available, but there are cases (including accessibility reasons) why a user
would need to see ALT text. Also, ALT text SHOULD be shown to make web authors
realize its important to put it in. The question is how do we make them realize
that ALT text is not something meant for putting the image title, which is for
the TITLE attribute?

--My suggestion--

Have the tooltip appear as follows ( [% %] represents an attribute):

| [%TITLE%]: [%ALT%] |

I got this idea on how Opera puts "Title: [%TITLE%]". When Title is not
available (its not required):

| [%ALT%] |

What do we do when ALT text is not specified or is an empty string or series of
spaces? We could show nothing, or we could put something like: "No description
(ALT attribute) specified."

Comment 1

15 years ago
Created attachment 138392 [details]
Test page

Mozilla, Konqueror and Opera7 display no tooltips for ALT. Internet Explorer
Win32 does, but will display TITLE instead if its available.

I suggest (as mentioned above), for accessibility reasons, we display both
TITLE and ALT in the same tooltip.

The next attachment will show how 1,2,3, and 4 labelled on the web page should

Comment 2

15 years ago
Created attachment 138394 [details]
How they should look

1. Display both ALT and TITLE
2. Display only ALT (no TITLE available)
3. Display only TITLE (no ALT available) -- naughty naughty
4. Show an error because neither are specified -- supernaughty

We'll have to change that the tooltip goes away after about 5 seconds and make
it so that it stays until the mouse moves again. Maybe we can make it so that
if you move it while on the image, then it goes away until you leave the image
and come back. IE does that.

Maybe 4 should just say "Error!" or not appear.
If you want to see the ALT text because the image isn't good enough, turn off
the images.

Seriously. If the image isn't good enough for the user, exactly how likely is it
that the user will be able to aim a pointer at the image then read the tooltip
text that appears.
Last Resolved: 15 years ago
Resolution: --- → WONTFIX

Comment 4

15 years ago
It isn't that common that alt and title be identical, as alt should be read as
part of the text when image is not displayed, while title's a supplemental
information; btw your alt text should've been Smiles, not colon colon smiles
colon etc.
Alt doesn't provide a "long description of the image", it provides an alternate
to the image, which indeed should not be that long. A long description is
provided by longdesc ( ). Advisory
information about the image is provided by title. Actually the information you
want is probably in the title.
A person who's not able to understand the image should either disable image
rendering or access alt in some other way, such as right click -> properties in
mozilla; if it isn't capable of understand any image, it will disable the entire
image rendering.
Instances of the three properties, let's take the mozilla banner for instances:
alt="mozilla home page"
title="image linking to the mozilla home page"
longdesc="the image represents the head of the red lizard on the left, then
factories on the ground and the writing".
Your last assertions are uncommentable without insulting.

BTW all current browsers support title tooltips, many and many people have
understood at least using title; why do you still want such things?

Comment 5

15 years ago
Its a matter of accessibility and a user shouldn't have to turn images off if he
or she is colorblind, etc.
Resolution: WONTFIX → ---
There is some Mozilla extension floating around which does what you ask for. 
I'd suggest using that rather than incorporating this into Mozilla proper.

*** This bug has been marked as a duplicate of 88297 ***
Last Resolved: 15 years ago15 years ago
Resolution: --- → DUPLICATE

Comment 7

15 years ago

Oh well, at least I tried. Praying someday this will be reconsidered or that w3c
will clarify their standards ;-)
You need to log in before you can comment on or make changes to this bug.