Page MenuHomePhabricator

|alt= should work when |link= is used
Closed, ResolvedPublic

Description

link= was implemented to stop people from mis-using <imagemap> to link files to other places beside the file description page.

However, <imagemap> allows specifying alt text while using |link= does not. See also: http://en.wikipedia.org/w/index.php?diff=252640097&oldid=252620105

It should be possible to use |alt= when |link= is used.


Version: unspecified
Severity: enhancement
URL: http://www.mediawiki.org/wiki/User:Simetrical/Bug_17044

Details

Reference
bz17044

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:26 PM
bzimport set Reference to bz17044.
bzimport added a subscriber: Unknown Object (MLST).

Wiki.Melancholie wrote:

alt= works for me, you probably mean tooltips?

Example:
[[File:Qsicon Exzellent.svg|16px|alt=alt is working|link=Link|actual caption (no title="" gets specified (non-IE tooltip))]]

What is missing in source here for me is title="", not alt=""; thus this probably is a dupe of bug 16912 (?)

ayg wrote:

alt= works fine whenlink= is used. Look at the HTML source of the page -- I've set a test case as the URL for this bug. On browsers that cause HTML alt= to render as a tooltip, the tooltip won't work when wikitext link= is set, because wikitext link= sets a tooltip on the wrapping <a> which overrides the tooltip on the image itself. However, alt= is supposed to be used for alt text, *not* tooltips. It doesn't even work for tooltips in non-IE browsers, as my link shows (see the last case, which doesn't have the custom "Commons" tooltip in Firefox). Therefore, this bug as stated is wrong: alt= on linked images is working as intended.

However, the unnamed parameter (which is different from alt= and is really only kept for backwards compatibility because Brion insisted on it, I wanted to use it only for captions) is supposed to set both alt text and tooltip, and on linked images it doesn't. This is a bug, which has already been filed as bug 16912.

*** This bug has been marked as a duplicate of bug 16912 ***