[an error occurred while processing this directive]
ToolTip Torture Test
Tooltips can be very useful things, but there are a few intracies that most authors
don’t understand how to take advantage of, and a few behaviors that are bugs in the
various browser implementations.
Several attributes should cause a tooltip or similar display when the cursor is passed over an
object with some or all of them. title
should always display its contents,
while alt
should only be displayed when the image has not been loaded.
I am not sure how longdesc
should be handled; it is paired with alt
in the HTML 4.01 specification, and seems designed to provide a textual description of the image in lieu
of actually showing the image (primarially for blind people, perhaps), but the spec is silent on
this, and it could be used simply as a means for providing an extended description or information about
the image appropriate for all users. Therefore, it is my contention that this link should always be displayed.
- TITLE & ALT
Move your mouse
cursor over the checkmark, and you should see a tooltip with the phrase, “This is a checkmark.” displayed near
the cursor. If it displays “checkmark image” instead, your browser is displaying the title attribute instead.
- TITLE, ALT, & LONGDESC
This
image should display a tooltip identical to the one above, but it should also have some sort of a hyperlink displayed near or
attached to it. A URL is specified in the LONGDESC attribute of that image tag.
- Really Long Text
This
image has an extremely long text string specified as the ALT text. The string ends with “…will be gray.” and you should see that.
- Ignoring Line Breaks
This
image’s ALT text is four sentences, with a line break between each sentence. According to the HTML specification, these
line breaks should be ignored, but Internet Explorer 6.0 interprets them; putting each sentence on a new line of the tooltip.
This is both useful and problematic behavior—and very incorrect. The HTML specification should be modified to allow for
simple formatting such as line breaks, bolding, and itallics.
- Forcing Line Breaks
The HTML specification specifies that all linefeeds shall be ignored, but some method of indicating
them in tooltips is needed. Two methods that occur to me are using 

(Unicode
NewLine) or /A
(CSS2 escape sequence for a traditional newline).
- Typesetting Character Entities
This
tooltip should contain several typesetting characters, including
an em dash after checkmark, a built fraction for 1/4 and double prime for 1/4 inch, curly quotes
around feature chart, and an ellipsis at the end.
- UTF-8 Typesetting Characters
This tooltip should contain
several typesetting characters, including an em dash after checkmark, a built fraction for 1/4 and double
prime for 1/4 inch, curly quotes around feature chart, and an ellipsis at the end.
[an error occurred while processing this directive]