bug-gnu-emacs
[Top][All Lists]
Advanced

[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


From: Adam Sjøgren
Subject: bug#16537: Use the title attribute for the tooltip, rather than the alt attribute.
Date: Sat, 25 Jan 2014 12:38:52 +0100
User-agent: 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
   images, etc."

    - http://www.w3.org/TR/html4/struct/objects.html#adef-alt

And:

  "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)."

    - http://www.w3.org/TR/html4/struct/global.html#adef-title

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:

 * http://asjo.org/misc/alt-title.html


  Best regards,

    Adam

-- 
 "Hur långt man än har kommit                                 Adam Sjøgren
  är det alltid längre kvar"                             address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]