Last modified: 2009-05-17 13:38:23 UTC
case 1: No tooltip is shown: [[Image:Qsicon Exzellent.svg|x16px|link=Wikipedia:Exzellente Artikel|tooltip]] case 2: Tooltip is shown if there is no hyperlink: [[Image:Qsicon Exzellent.svg|x16px|tooltip]] case 3: Hyperlink an tooltip is shown: <imagemap> Image:Qsicon Exzellent.svg|x16px default [[Wikipedia:Exzellente Artikel|tooltip]] desc none </imagemap> I would prefer to get the result of case 3 by using syntax of case 1.
Case 3 is probably specific to [[mw:Extension:ImageMap]], while the first two use cases are in MediaWiki core.
Note that, although alt="tooltip" is available in source code and thus probably shown as fallback tooltip with IEs, all other web browsers rely on title="tooltip" to be specified. But title="" is missing. See https://bugzilla.wikimedia.org/show_bug.cgi?id=17044#c1
*** Bug 17044 has been marked as a duplicate of this bug. ***
The HTML for case 1 looks like <a href="http://commons.wikimedia.org/wiki/" title="commons:"><img alt="Commons" src="http://upload.wikimedia.org/wikipedia/commons/9/9d/Commons-logo-31px.png" width="31" border="0" height="41"></a> The unnamed parameter is eaten in favor of the default link tooltip. This is wrong. This is probably a simple change to Parser::makeImage() to fix; it might be necessary to look a couple of levels down at the stuff it calls.
Any progress 5 months later on this issue?
Apparently not.
Created attachment 6116 [details] Patch to set a's title= for [[Image:..|link=]] I've been hunting around, and I think this patch should fix the problem. The code is untested, because i don't run a mediawiki installation, but should be easy to verify.
- $linkAttribs = array( 'href' => $options['custom-url-link'] ); + $linkAttribs = array( 'href' => $options['custom-url-link'], 'title' => $alt ); This wasn't right -- it was adding an empty title if the alt text was empty, which I don't think we want. Other than that, it tested out fine. Committed as r50641.
So does that mean it's fixed? It's still not working at http://en.wikipedia.org/wiki/Template:Click/doc in the examples there.
...which would be because Wikipedia isn't running r50641 yet, see [[Special:Version]] (currently at r48811). But still, it will be available fairly soon.
It will be available (assuming all goes well) at the next scap, which may or may not be fairly soon. The last scap was close to two months ago, and who knows when the next one will be. But it should work when [[Special:Version]] gets to r50641 or later.