[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16537: Use the title attribute for the tooltip, rather than the alt
bug#16537: Use the title attribute for the tooltip, rather than the alt attribute.
Sat, 25 Jan 2014 12:38:52 +0100
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)
Lars Ingebrigtsen <address@hidden> writes:
> address@hidden (Adam Sjøgren) writes:
>> - (put-text-property start (point) 'help-echo alt))
>> + (when title (put-text-property start (point) 'help-echo title)))
> Well, it should display the alt text when there is no title, I think.
> I've applied that instead.
That is of course up to you - I disagree:
The alt text is only for when the image cannot be displayed, while the
title is for the text in the tooltip. Quoting the HTML-standard:
"alt = text [CS]
For user agents that cannot display images, forms, or applets, this
attribute specifies alternate text. The language of the alternate
text is specified by the lang attribute.
Several non-textual elements (IMG, AREA, APPLET, and INPUT) let
authors specify alternate text to serve as content when the element
cannot be rendered normally. Specifying alternate text assists users
without graphic display terminals, users whose browsers don't support
forms, visually impaired users, those who use speech synthesizers,
those who have configured their graphical user agents not to display
"title = text [CS]
This attribute offers advisory information about the element for
which it is set.
Values of the title attribute may be rendered by user agents in a
variety of ways. For instance, visual browsers frequently display the
title as a "tool tip" (a short message that appears when the pointing
device pauses over an object)."
Firefox and Chrome follows the standard, while Internet Explorer (as far
as I remember) does as shr (now) does.
Here is a quick HTML-page for testing:
"Hur långt man än har kommit Adam Sjøgren
är det alltid längre kvar" address@hidden