ALT attribute and ToolTips

For as long as I can remember (I think going back to IE3), Internet Explorer has displayed a ToolTip containing the contents of the ALT attribute for IMG elements. Other browsers including Netscape 4 also showed the ToolTip. In IE7, this looks something like this:

tooltipIn IE8 standards mode, the ToolTip is no longer shown. This is a change we made to be more standards compliant, more interoperable with other current browsers, and to encourage more accessible mark-up. ToolTips are still shown in quirks and IE7 standards modes.

The problem comes because having the ALT attribute displayed as a ToolTip encourages two behaviours that aren’t compatible with the accessible web. The first is that content authors naturally enough set their ALT text to be something appropriate for a ToolTip but not ALTernate text to represent the image in scenarios where users can’t see the image. The second is that content authors actively don’t put alternate text because they don’t want a ToolTip displayed. Neither of these is desirable.

The solution for content authors is to use the TITLE attribute if they want a ToolTip. The TITLE attribute applies to other elements with the same effect and not just images. The ALT attribute should be used for text that’s an alternative to the image.