Originally posted by RichardCranium
View Post
This was one of the hardest-fought battles with Microsoft over the epic fail of Internet Explorer, finally won with IE 8 (in IE 8 mode).
HTML 4.01 makes it perfectly clear that the alt attribute of an img element is intended to provide alternative text that can be used as a substitute when the image is not available, whether through network failure, or through a limitation of the client software (e.g. a text-only browser like Lynx) or, indeed, a limitation of the user (e.g. an unsighted person). The title attribute, which applies to many elements rather than just the img element, is intended to provide additional information relating to that element.
Now, what is a tooltip? Is it a substitute for the thing to which it relates? Or is it additional information concerning the thing to which it relates? Clearly the latter. And this is why Internet Explorer is the only browser to display the contents of the alt attribute as a tooltip.
Although this was clearly a Bad Thing - particularly given that IE does not properly display the contents of the alt attribute as a textual substitute if, for some reason, the image is unavailable - Microsoft (and specifically certain members of the IE Team) continued to whinge for years that, now that they'd fscked things up so badly, people had come to rely on it, so they couldn't start doing it properly.
They also added insult to injury by insisting that there was nothing wrong in what they did, even though it was clearly incorrect and directly damaged efforts to encourage people to make their web sites accessible to those with disabilities.
As a result, those of us (like me) who care about interoperability have spent years adding empty title attributes to images when appropriate, as they overrode the tooltip mechanism, meaning that the alt attribute could be used for its intended purpose without driving everybody crazy when they accidentally let the mouse come to rest on an inline image, and a tooltip containing text intended for the case when the image which they could see wasn't there suddenly obscured half of the sentence they were trying to read.
xkcd.com uses the title attribute in the way it was intended
Although the content of the alt attribute is merely the title of the particular strip, so there's fail there
Comment