Template talk:Abbr/Archive 1

Order of paramenters
Hello!, it's good to see that there is one template to handle abbreviations. I'm working on the Accessibility project, and I was disappointed when I discovered that MediaWiki doesn't support the &lt;abbr&gt; tag, but this should be changed for web accessibility reasons. I'll ask developers to support that tag (but not &lt;acronym&gt;, it will be deprecated on XHTML 2.0), but editors can start using that facility thanks to this template.

However, I think that the order of parameters should be reversed. At the time of writing, the first parameter is the explanation, while the second one is the abbreviated form:



This is analogous to the &lt;abbr&gt; tag:

abbr.

However, the expanded form is not required after the first appearance, so this should be optional. Therefore, I think the abbreviated form should be the first paramenter, and the expanded form should be the second one and optional:



Currently there are few pages using this template, so the impact of the change will be easy to repair. What do you think? --surueña 21:53, 8 May 2006 (UTC)

Strange formatting
This template produced pretty strange formatting in the infobox of United Kingdom:

In the UK, some other languages have been officially recognised as legitimate autochthonous (regional) languages under the European Charter for Regional or Minority Languages. In each of these, the UK

Notice the  and   tags which create new lines where not needed.--Pethr 18:15, 25 May 2007 (UTC)

unicode
Added a parameter for Unicode formatting. Tried for IPA as well, but the IPA template popup overrides the one from this template. Will simply copy the IPA template code over if I don't find a simpler workaround. kwami (talk) 20:18, 25 April 2010 (UTC)

Usefulness with wikified terms
I think some consideration along the following lines should be included in the template's documentation (rewritten as a style guideline instead of my speculation):

This template does work with a wikified term; hovering over the underline (actually border-bottom, it seems) will show the intended tooltip (at least in Firefox). But the text of the link itself will have its own tooltip with the name of the article to which it links, and is more likely to be hovered over than a dotted line under it. Wikified terms should be written as unredirecting links, and in many cases the tooltips for those links would already have the explanatory text in it, but not always.

So which of the following ways would be best to explain WYSIWYG, an article that uses the acronym as its title, to someone who doesn't click the link, but might hover over it?


 * WYSIWYG - with the template and two tooltips, the more useful of which is less likely to be hovered over
 * WYSYWIG - linking to a redirecting article shown as the tooltip, which explains the acronym
 * WYSIWYG (What You See Is What You Get) - with the explanation written in the text (useful for non-linking versions of the article's text, such as a paper reprint)

B7T (talk) 03:30, 31 August 2010 (UTC)

FYI
no longer redirects to this page; it was recreated here, but it was just protected a few hours ago, so I can't undo that edit. --64.85.216.174 (talk) 14:34, 18 June 2011 (UTC)
 * I've reverted it back to a redirect. -- WOSlinker (talk) 16:21, 18 June 2011 (UTC)

New template requested — Discreet abbreviation
Hello,

See this discussion.

--Nnemo (talk) 23:23, 24 September 2011 (UTC)

Availability in other languages
The title seems self-explanatory. Is this wonderful template available in other languages? I'd like it to be available in Dutch but am not able to do so. Markvanw (talk) 08:26, 5 November 2011 (UTC)
 * On the main template page, there are eight languages listed in the left-hand margin. From top to bottom, these are: be:Шаблон:Abbr; eo:Ŝablono:Diskreta mallongigo; fr:Modèle:Abréviation; id:Templat:Abbr; ja:Template:Abbr/doc; or:ଟେମ୍ପଲେଟ:Abbr/doc; fa:الگو:مخفف; ru:Шаблон:Abbr. -- Red rose64 (talk) 13:03, 6 November 2011 (UTC)

New class parameter
I've updated the sandbox to add an optional fourth parameter, which will add an HTML  attribute. This can be used for adding microformat attributes, or, later, for styling. Please will someone check my code? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 23:37, 19 August 2012 (UTC)
 * It will fail if no 3rd parameter is given (which is also optional). Such parameters should be named. — Edokter  ( talk ) — 08:32, 20 August 2012 (UTC)
 * I envisioned that it would be used as, say,, but thanks for your changes. I've made an edit request. Once that's done, we'll need to update Abbrlink accordingly.  Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 10:48, 20 August 2012 (UTC)
 * Yes check.svg Done after some puzzling why my tests didn't work, I found that the examples on the doc page were badly-formatted. -- Red rose64 (talk) 12:25, 20 August 2012 (UTC)
 * Thank you; I've updated the documentation. The classes do not appear in the rendered HTML. Have I messed up; is there a bug; a caching issue; or is MediaWiki stripping the attributes? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 13:18, 20 August 2012 (UTC)
 * The quotes were prematurely closing the HTML attributes; never use quotes in template parameters. — Edokter  ( talk ) — 14:53, 20 August 2012 (UTC)
 * What Edokter said. By using quotes in both the template code and its invocation, you were creating invalid HTML:  → UK and the MediaWiki parser was cleaning this up to give UK. I've removed those quotes from the doc page, so we now have   → UK</abbr> → <abbr >UK</abbr>. -- Red rose64 (talk) 15:20, 20 August 2012 (UTC)
 * Of course, thank you, both. So, how do we pass the parameters from Abbrlink? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 17:02, 20 August 2012 (UTC)
 * Simply pass them. It's been taken care of. — Edokter  ( talk ) — 18:23, 20 August 2012 (UTC)
 * Thank you again. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 18:27, 20 August 2012 (UTC)

A complicated usage, which doesn't work
I'm trying to build a an abbreviation whose long text is transcluded:

which does this - BIT

That works OK, but the problem is the transcluded code includes a wikilink - square brackets are included in the pop-up text, but thankfully no actual link. So I want to get rid of them. Am I going wrong here? - I wrap the transclusion part in ? Thus: }}

But it doesn't work, ;

BIT

is the code tag the correct one to use? It's always worked for me before.

(I got the same behaviour when I tried using the html  tag directly.)

By the way, on older items in this talk page, the popup contains just text. Now it carries a big fat black question mark above it.

John of Cromer in China (talk) mytime= Wed 23:55, wikitime= 15:55, 21 November 2012 (UTC)
 * The <code ></code> element is used to represent a fragment of computer code. It does nothing apart from change the appearance of text, normally to a monospace font . Popup text or "tooltips" cannot contain Wiki markup, since they are placed inside the   attribute of  tag: note that it explicitly states "The attribute, if specified, must contain an expansion of the abbreviation, and nothing else." More generally, HTML attributes can never contain markup. -- Red rose64 (talk) 16:30, 21 November 2012 (UTC)

"#" interpreted as Wikicode
I tried to use # as per WP:POUND, but the pound appears to be processed as Wikicode.

1 in 1938. "}} renders as:

Is something like needed?  C üRly T üRkey  <sup style="margin-left:1.5ex;">Talk <sub style="margin-left:-5ex;">Contribs 12:44, 26 November 2012 (UTC)
 * That is normal behaviour for the MediaWiki template parser: when the value returned by many parser functions begins with colon, semicolon, hash or asterisk, it's treated as if it were the start of a new line; a hash initiates an ordered list, these are normally numbered. There are at least two workarounds:
 * → &#x23;
 * -- Red rose64 (talk) 13:31, 26 November 2012 (UTC)
 * -- Red rose64 (talk) 13:31, 26 November 2012 (UTC)


 * While it may be "normal behaviour for the MediaWiki template parser", is there a use case for this type of behaviour with this particular template? If not, it's certainly not what most of us would expect.  It seems to be causing frustration with others than myself, as well:  usage of the template (with this hack) was removed by User:Dicklyon with the edit comment "that abbr. hack is getting ridiculous, and still doesn't work; just use number sign".


 * Wouldn't fixing it so useless, unexpected behaviour doesn't happen be better?  C üRly T üRkey  <sup style="margin-left:1.5ex;">Talk <sub style="margin-left:-5ex;">Contribs 01:20, 27 November 2012 (UTC)


 * I'm kind of surprised that there is no HTML entity name for this. "Pound" is something else to this Brit (&pound;).  So whatever you do, don't use &amp;pound;.


 * A propos WP:POUND, I try to avoid making any abbreviation the same as a real word, so rather than No. I would use Nr (which also happens to be normal German form). I suppose you could use No (= No) or N&amp;ordm; (= N&ordm;)
 * John of Cromer in China (talk) mytime= Tue 10:45, wikitime= 02:45, 27 November 2012 (UTC)
 * Well, except that No and N&ordm; are both non-standard. The standard for American comic books is # .  I'm trying to use this standard in the most helpful way with the least amount of hackery.  C üRly T üRkey  <sup style="margin-left:1.5ex;">Talk <sub style="margin-left:-5ex;">Contribs 13:34, 27 November 2012 (UTC)
 * There is no HTML entity name for  because none is needed. HTML entity names were created as a means of displaying characters belonging to two groups: (i) four characters  which have a special meaning in HTML syntax, for which   were defined; (ii) those not provided on a standard American keyboard, the best-known of these is   but   is also one of them. The hash mark is provided. However, any character (typeable or not) may be specified using the numeric entity syntax, as I demonstrated above:   →   (and   →  ).
 * Regarding "Nr": please don't use German conventions - this is the English Wikipedia, and we are writing for readers of the English language. The Manual of Style is clear: subject to one specific exception, the only permitted abbreviation for "number" is "No." (two letters and one period, no other characters). The one exception is for comic book issue numbers, where the hash mark is permitted. -- Red rose64 (talk) 13:11, 27 November 2012 (UTC)


 * The main problem on "English Wikipedia" is those pages with untypeable names, so you can't actually get there directly. The edit bar isn't going to help.  The other day I came across a page called Pāṇini.  That's impossible to type on a keyboard outside wherever (Pakistan I think).  Of course you could escape it ... http://en.wikipedia.org/wiki/P%C4%81%E1%B9%87ini ...   Even "normal" accented characters are difficult to type into the address bar, such as Béguinage.
 * Anyway, to the problem in hand. What is needed is something before the # (hash, or as WP:MOS has it, pound) which takes up no space on the rendered page, but makes # no longer the leading character.  There are two characters to choose from:
 * zero width non-joiner &amp;zwnj;
 * zero width joiner &amp;zwj;
 * I'm not sure what the term non-joiner means. I don't think it matters here.  So you should decide -
 * 1 in 1938. "}} renders as:

and
 * 1 in 1938. "}} renders as:
 * (PS I think you mean Superman) John of Cromer in China (talk) mytime= Wed 08:31, wikitime=  00:31, 28 November 2012 (UTC)
 * (I'll bet you a pound I don't!)  C üRly T üRkey  <sup style="margin-left:1.5ex;">Talk <sub style="margin-left:-5ex;">Contribs 03:33, 28 November 2012 (UTC)
 * Stuff like Béguinage shouldn't be a problem. The editors should be creating redirects to hand that—try clicking Beguinage and watch the magic in action.
 * I actually created a template, #, to handle the pund/hash/number sign for comic book articles until Abbr can be made to handle it. I don't think it's reasonable to expect most editors to know what an HTML entity is, and I don't think it's reasonable to expect such bizarre output as what # currently produces.  The fewer ugly hacks on the page the better.  C üRly T üRkey  <sup style="margin-left:1.5ex;">Talk <sub style="margin-left:-5ex;">Contribs 03:40, 28 November 2012 (UTC)
 * Regarding Pāṇini: Article titles says to create redirects so that the title may be entered easily when using keyboards that do not have these characters. Panini is a disambiguation page, not a redirect; but one of the entries in that does link directly to Pāṇini. As noted above, Beguinage is a redirect to Béguinage.
 * You ask for "something before the # ... which takes up no space on the rendered page, but makes # no longer the leading character"; I have already demonstrated one method of doing exactly this: it is :
 * It doesn't have to be - some HTML elements (those which have no effect when there are neither attributes nor content) will do instead, for example :
 * Both of these are in use with other templates, and the method is certainly documented, so there is no real reason not to do it this way. By contrast, the use of the zero-width joiner and zero-width non-joiner characters is not encouraged; there has been discussion about these on other pages like WP:VPT. They have their uses, but template hacks are not among them.
 * The template # does work; when it's been through MediaWiki template expansion, it is identical to in its effect. I have no objection to its use; but as Curly Turkey is aware, it doesn't support some of the other features of, the class and id parameters (the third, unnamed, parameter is unnecessary since neither "No." nor "Number" require the use of Unicode or IPA treatment). -- Red rose64 (talk) 08:09, 28 November 2012 (UTC)
 * Both of these are in use with other templates, and the method is certainly documented, so there is no real reason not to do it this way. By contrast, the use of the zero-width joiner and zero-width non-joiner characters is not encouraged; there has been discussion about these on other pages like WP:VPT. They have their uses, but template hacks are not among them.
 * The template # does work; when it's been through MediaWiki template expansion, it is identical to in its effect. I have no objection to its use; but as Curly Turkey is aware, it doesn't support some of the other features of, the class and id parameters (the third, unnamed, parameter is unnecessary since neither "No." nor "Number" require the use of Unicode or IPA treatment). -- Red rose64 (talk) 08:09, 28 November 2012 (UTC)

Use with images
Per discussion at Template talk:Infobox user and recent edits to Infobox user, can we make this template accept images? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 14:32, 5 September 2013 (UTC)
 * It seems to take images just fine as is. Bad Title Example.png — Edokter  ( talk ) — 15:33, 5 September 2013 (UTC)

Use in CS1 templates
When used in a template, the strip markers are exposed:

--  Gadget850talk 09:56, 17 April 2014 (UTC)
 * It is because of the  used in the template. --   Gadget850talk 10:04, 17 April 2014 (UTC)
 * The #tag seems to have more of these issues, see also Template talk:Reflist.

Styling
Would it be possible to add a switch, say no, to style the abbr without underlining? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 19:20, 13 August 2013 (UTC)
 * Possible, yes. But doing so introduces an inconsistency in how is styled. Why would you want to disable it? —  Edokter  ( talk ) — 21:15, 13 August 2013 (UTC)
 * In tables, where an abbreviation is repeated many times, underlining each would be excessive. And it overwhelms short abbreviations such as &#9794;. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 21:22, 13 August 2013 (UTC)
 * My perhaps obvious answer would be: don't repeat it then (asuming they're the same). With the underline removed, there would be no indication of an available tooltip, which hurts accessability, so I am hesitant to add such an option. — Edokter  ( talk ) — 22:16, 13 August 2013 (UTC)
 * [Belated response, sorry] repetition is necessary in sortable tables. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 19:23, 11 June 2014 (UTC)

Requested move 11 June 2014
<div class="boilerplate" style="background-color: #efe; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">
 * The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review. No further edits should be made to this section. 

The result of the move request was: Withdrawn by requester. Sardanaphalus (talk) 08:46, 12 June 2014 (UTC)

Template:Abbr → Template:Tooltip – Adding a tooltip seems to be this template's purpose and what makes it distinctive. Sardanaphalus (talk) 09:14, 11 June 2014 (UTC)

Survey

 * Feel free to state your position on the renaming proposal by beginning a new line in this section with  or  , then sign your comment with  . Since polling is not a substitute for discussion, please explain your reasons, taking into account Wikipedia's policy on article titles.


 * Oppose, the template's purpose is to echo the HTML tag; that is where it derives its name from. {tooltip} already redirects here, so I see no advantage in moving. —  Edokter  ( talk ) — 09:52, 11 June 2014 (UTC)
 * Oppose, concur with Edokter. This was discussed in the TfD for tooltip. --  Gadget850talk 17:46, 11 June 2014 (UTC)
 * Oppose, a tooltip may appear in you user agent (browser), but does not in everyone else's. Nor should the template be used to attempt to force a tooltip on anything which is not an abbreviation. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 19:21, 11 June 2014 (UTC)


 * Thanks for all the above. I hadn't realized this template was meant to echo, so I'm withdrawing the request. Sardanaphalus (talk) 08:46, 12 June 2014 (UTC)

Discussion

 * Any additional comments:


 * The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.

OK to combine abbr and wikilink?
I have a space-restricted table, no place to spell things out. In there, I can combine abbr and wikilink :

Demo 1
 * is here, invisible: &gt;&lt;
 * Elsewhere:  &rarr;
 * U.S.

With me, the anchor/link shows the two underlines asked for (OK). Both abbr expanding and clicking work as expected. Note that the anchor-target is on the same page (linking to outside is not asked for).

My question is: is this, by W3C page design principles, a correct way to use &lt;abbr>?

Note: interestingly, this also functions, twice, in mobile view. Note: the inverse nesting does not work well
 * Demo 3: &rarr; ABC ❌

(Repeated here to check scroll effect: U.S.). -DePiep (talk) 14:20, 4 November 2014 (UTC)
 * Demo 1 works because the emitted HTML is valid:  Demo 3 does not because you're trying to put markup into a   attribute:   which will never work: the   attribute can only be plain text (possibly including newlines). -- Red rose64 (talk) 15:34, 4 November 2014 (UTC)
 * Thx, so technically it is sound. Next, is it Good Design, or a hack to avoid? -DePiep (talk) 16:41, 4 November 2014 (UTC)
 * Strictly speaking, it is technically valid, but I have never seen the two combined before, and I would not advice such a construct. The visual aspect is confusing enough (is it a link or a hint?), and with popups enabled it is even more of a mess.  16:47, 4 November 2014 (UTC)
 * There is another way, not mentioned so far: → U.S. →   like demo 3 it puts the <abbr ></abbr> element outside but doesn't misuse its   attribute. -- Red rose64 (talk) 16:59, 4 November 2014 (UTC)
 * FYI: There are over 50,000 users who will never see the abbreviation since we have either popups or Hovercards enabled. We see only the linked article. --  Gadget850talk 17:38, 4 November 2014 (UTC)
 * I have Popups and I see the hints as well, but they sometimes overlap.  17:41, 4 November 2014 (UTC)
 * , is this note still valid? With Hovercards I see both in two layers (expanded abbr on top). -DePiep (talk) 20:34, 4 November 2014 (UTC)
 * That does not work; the title is empty.  17:41, 4 November 2014 (UTC)
 * It shows for me; if the <a ></a> has no title, the title of the parent element (in this case <abbr ></abbr>) is used, see attribute, rule 3. -- Red rose64 (talk) 17:53, 4 November 2014 (UTC)
 * The hint only shows for me when I hover over the dotted underline, not on the link itself. Popups keeps adding an empty title to the link, making it disappear.  18:15, 4 November 2014 (UTC)
 * With me, the hint (expanded abbr) shows on the forground of Hovercards (like a tooltip). So it is there correctly, but it is not a nice view. Will have to look at WP:POPUPS?
 * FYI, applied in this Template:Kennedy family tree/sandbox. The in-page jumping makes sense there. -DePiep (talk) 20:34, 4 November 2014 (UTC)
 * I still think we should not combine links with abbreviations. They each have their own cursor; now the link does not show its cursor.  21:10, 4 November 2014 (UTC)


 * Sigh. Another clash of W3C options that so far is not solved from grand design. Instead, mw extensions take over command. -DePiep (talk) 10:39, 5 November 2014 (UTC)
 * Hovercards also interferes with the title attribute.
 * Apollo 11 Apollo 11
 * Apollo 11 Apollo 11
 * I have noted this at mw:Talk:Beta_Features/Hovercards. The solution/answer might be relevant for abbr too. -DePiep (talk) 12:16, 5 November 2014 (UTC)

I have talkerd about this at mw:Topic on Talk:Beta Features/Hovercard. Results:
 * Results
 * Correctly nesting code to add a title wrt hovercards:

wiki M.P. → wiki M.P.
 * No objections from that level to combine link & abbr
 * Current usage: in infobox chembox, Category:R-phrase_templates like.
 * I conclude: not (to be) prohibited. -DePiep (talk) 21:37, 1 December 2014 (UTC)
 * Now, it is not recognizable as a link. They should not be combined.  23:32, 1 December 2014 (UTC)
 * ? With me it looks OK. Note that there are multiple results. One is about interaction between hovercards and tooltip. Second is . In general, w3c trumps hovercards (and they don't contradict). -DePiep (talk) 23:37, 1 December 2014 (UTC)
 * The R36 link does not show a pointing hand, so it does not look like a link. and  are not compatible and clash over presentation; the   (set by MediaWiki) overrides   (set by client), hence they should not be combined. Please remove this construct.   09:38, 2 December 2014 (UTC)

Styling (2)
Please note a discussion which may affect the styling of this template, at Templates for discussion/Log/2015 July 28. You contributions will be welcome. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 11:05, 28 July 2015 (UTC)

Mobile
we need something to help mobile users to use this template as well since they cannot get the meaning of the work since mobile browsers have no hover much less a tooltip and as I tested in Firefox and Chrome for Android there doesnt seem to be any other thing to accomplish for the lack of a hover and tooltip feature. I would say that is the browser is a mobile browser then we have 2 options:

a) display only the written out thing

b) use to indicate what it means like "UK (United Kingdom)".

 M ' y ' 1  09:33, 23 September 2015 (UTC)

Quotes in meaning
The meaning text goes into an HTML attribute, so it is passed through nowiki; however, this preserves double quotes which then interferes with the output HTML. Please either specifically handle quotes, converting to HTML entities, in the meaning text, or throw an error. I have seen this error missed in articles, and there is nothing specific in the documentation about it. 217.28.6.255 (talk) 02:39, 15 July 2016 (UTC)
 * Good catch, let me fiddle with it in the sandbox. Matt Fitzpatrick (talk) 03:38, 15 July 2016 (UTC)
 * If you get a chance, please check Template:Abbr/testcases and let me know if the sandbox version fixes the problem. I can go ahead and make the edit if all looks well. Matt Fitzpatrick (talk) 03:50, 15 July 2016 (UTC)
 * Yes check.svg Done Seems to be working. Please feel free to reopen the request if there are still problems. Matt Fitzpatrick (talk) 22:04, 15 July 2016 (UTC)

Template-protected edit request on 29 July 2016
babsson 20:31, 29 July 2016 (UTC) my request is about to now mor about edit so i'm hear to understand i need it i now i'm not perpect so i whant to be — Preceding unsigned comment added by Ibrahim sulaiman babawoo (talk • contribs) 21:31, 29 July 2016‎


 * Your request is unclear. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 21:19, 29 July 2016 (UTC)

Help me
Dubai.png

Does the toll support wikilinks and images. I mean can i type  — Preceding unsigned comment added by VarunFEB2003 (talk • contribs) 16:23, 30 July 2016‎

As can be seen from the above, that (with added  parameter) gives the HTML output:



But since the image is not an abbreviation for "Mean Sea Level Pressure", that's nonsensical. Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 15:49, 30 July 2016 (UTC)
 * ya thanks, that was just an example i thought of. Obviously I am not gonna use it like that. Thanks a lot. VarunFEB2003 (talk) 16:50, 30 July 2016 (UTC)

At least one error
There were seemingly some similarities between the functionality of this template and the old Template:Tooltip, although they were intended for different purposes. However, that template since long time is a redirect to the template Abbr.

On the other hand, the documentation for Abbr does make it very clear that Abbr is not supposed to be employed for other purposes than expansion of abbreviations and acronyms. I checked that there were similar warnings also seven years ago, when the redirect was effectuated (although the exact warning formulation has changed a bit).

In other words: The template Tooltip, which constructed a "hoover text" without using the html construct was replaced by a redirect to the functionally similar template Abbr, which uses that construct; but we are 'forbidden' to use this template for creating general tooltips, according to its documentation. At least one thing must be wrong: Either the redirect that implicitly tells us that general tooltips should be produced by a template employing, or the documentation that tells us that a template employing never should be used for creating general tooltips. JoergenB (talk) 12:21, 2 September 2017 (UTC)


 * I made as much sense as I could out of this complicated situation, and added a more direct warning for mistakenly using this as a tooltip, just because the template tooltip redirects here. The warning itself duplicates the more precise warning further down.  However, quite a number of users might believe that a template with a synonym name Tooltip might be employed to create a tooltip, without reading on to the more detailed information. JoergenB (talk) 17:15, 10 September 2017 (UTC)

Class parameter
I'd like to add a class parameter, as in this |this self-reverted edit, but I'm not sure how to do so, when the other parameters are unnamed. Can someone assist, please? — Preceding unsigned comment added by Pigsonthewing (talk • contribs) 09:39, 26 May 2010 (UTC)
 * (an old post, let me give it a datestamp for the archiving:) -DePiep (talk) 20:39, 10 October 2017 (UTC)

Add class=country-name
The documentation demonstrates adding country-name. Is that stil a used and useful option, to be promoted? -DePiep (talk) 19:08, 9 October 2017 (UTC)
 * It modifies the class of the <abbr ></abbr> tags used in the template, so it is still an optional part of the template. Primefac (talk) 20:43, 9 October 2017 (UTC)
 * I meant to ask: does adding this class name have any effect? (Couldn't find it in common.css etc, for example). (Or am I misunderstanding classes?) -DePiep (talk) 21:01, 9 October 2017 (UTC)
 * Yeah, depending on how some people set up their CSS a country class will display differently than a non-country class. Who these people are I don't know, but I know some people set their css up like that. Primefac (talk) 00:22, 10 October 2017 (UTC)
 * OK, I'll add it. -DePiep (talk) 07:09, 10 October 2017 (UTC)
 * A value in a  attribute can cause the invocation of a rule defined in a style sheet, or of a function defined in some JavaScript; but it doesn't have to do either. It is not an error for a class name to be used in the HTML of a page and yet appear in no style sheets or scripts at all. Classes are merely a way of associating one or more objects having some relationship: so if we scan through a page source looking for  tags with the   attribute, and pick out only those where the value-list of that attribute includes , this should reveal abbreviations having a related purpose (presumably, the abbreviation of the name of a country); and any other abbreviations would be passed over by that scan. -- Red rose64 &#x1f339; (talk) 11:09, 10 October 2017 (UTC)
 * As I expected it to be, thx. So when adding a class, we are talking "into the blind" as the olds communication expression goes (i.e., without certainty of being received). Like with those Apollo things. I also get that it's not just css-style involved (commons.css), but semantics too. I have some templates to update. BTW, is there a better way to search for sensible class names? (looks like F3-ing "commons.css" is not optimal). -DePiep (talk) 20:34, 10 October 2017 (UTC)
 * Edited Infobox drug, like []. -DePiep (talk) 22:47, 10 October 2017 (UTC)
 * You're not likely to find anything useful by searching for "commons.css". If you mean that you are going to search in a file named "commons.css", that's unlikely to succeed, since [//en.wikipedia.org/w/index.php?title=Special:Search&search=intitle%3Acommons.css&ns2=1 there are only five such pages], all in User: space - and four of those are probably misnamed. Page names that are recognised include MediaWiki:Common.css and User:Example/common.css but of course the latter will be user-specific.
 * The thing to search for is the class name; do so mainly in MediaWiki: namespace, but you'll also need to search User: space too. Don't forget the same namespaces on . Even this won't pick up anything defined in the MediaWiki software itself. -- Red rose64 &#x1f339; (talk) 16:13, 11 October 2017 (UTC)

Better examples needed
Named parameters:
 * The Usage section includes three parameters whose meaning is (somewhat) explained, but whose purpose will be extremely opaque to those of us who don't write much HTML or CSS markup:
 * class: Adds a CSS class.
 * id: Adds a HTML id; this must be unique on the entire page.
 * style: Adds a style attribute.


 * I'm guessing that "style" in this context means a style defined in the relevant HTML – whether explicitly, or inherited from a definition in the relevant CSS. Could some body please clarify this?


 * The Examples that follow the Usage section include just one that adds a value for each of class and id, but none for style; nor is it clear what difference this would make to how the code will be rendered for any "Jane Doe" reader who uses the default Wikipedia settings for CSS etc. So the examples completely fail to clarify why these parameters are available, and why they are valuable – that is, how an editor could use them to improve Wikipedia.  Please provide some instructive examples, that show how they change the rendering of a Wikipedia article.

yoyo (talk) 14:32, 4 March 2018 (UTC)

TemplateData parameters
The TemplateData for undefined has several parameters, each of which corresponds to a positional (unnamed) or named parameter of the undefined template markup. However, the template includes style as a named parameter, but style does not also appear as a TemplateData parameter. Is this omission accidental or deliberate?

I'm thinking that if the parameters id and class are of interest to various reporting tools, then style probably is, too. And why would the VisualEditor not make use of any defined HTML style? yoyo (talk) 14:51, 4 March 2018 (UTC)

Tooltip in RfD
One month late, but people would likely be interested in this discussion on Tooltip Galobtter (pingó mió) 09:27, 9 May 2018 (UTC)
 * The discussion has now been closed. The result was to deprecate Tooltip as follows:
 * All uses will be reviewed for appropriateness under Manual of Style/Accessibility.
 * Appropriate uses should be converted to use Abbr; Any non-abbreviations should be removed or replaced with footnotes.
 * Any assistance would be appreciated. ~ Amory <small style="color:#555"> (u • t • c) 17:59, 19 May 2018 (UTC)

Link error detection
This template will not work with a link if the link is inside the template, rather than surrounding it.
 * If it's around the abbreviation value, the tooltip does not work.
 * If it's around the tooltip text, this is invalid markup, since that material can only be plain text.

I've updated the documentation to reflect this, but there are thousands of cases of that need to be fixed, and ideally we'd detect both of the bad link conditions and throw an error after that cleanup is done, the way the citation templates and various others throw big red errors if you try to do something wrongheaded with them. This kind of detection code might require a Lua module instead of old-school wiki-template code. — SMcCandlish ☏ ¢ 😼  01:56, 13 June 2018 (UTC)
 * You can use delink to remove links from text. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 02:41, 13 June 2018 (UTC)
 * I believe I've implemented what you're asking for in the sandbox, which produces an error category and silently removes the link whenever a link is specified in either parameter. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 02:46, 13 June 2018 (UTC)
 * Schweet.  — SMcCandlish ☏ ¢ 😼  00:52, 14 June 2018 (UTC)

Resolving Template:Abbr and Template:Hover_title issues
Please see the issues raised at Template talk:Hover title, and Template talk:Hover title?
 * The first is an accessibility issue that might need to be addressed by some CSS/JS combination or something. Progress is stuck for the moment, likely due to just insufficient input.
 * The latter is about making these two templates' parameters cross-compatible. I'm not sure what the best approach is for the latter one. Maybe creating a temporary copy of ; changing all calls to that template to call the temp version; changing the parameters in the non-temp version, migrating the extant template calls to the new syntax and to point back to the real template, then speedily delete the temp copy.

The issues relate to each other conceptually but not very technically. Maybe a bot or something can help with the second issue; while the deployment level of that template is orders of magnitude smaller than that of, it's still thousands of pages. It'll eventually be many more, since all uses of that are not for abbreviations need to migrate to  (whether or not accessibility perfection is achieved yet – it's also an accessibility problem  a standards-compliance/HTML validity problem to abuse  markup for general tooltips that have nothing to do with abbreviations).

Anyway, it's probably better discussed at the extant threads at Template talk:Hover title. I just want people who watch this template to be aware of the related stuff at that one. pinging a few previous respondents. — SMcCandlish ☏ ¢ 😼  02:49, 14 June 2018 (UTC)

Template-protected edit request on 12 September 2018
Naomi Osaka is a professional tennis player representing Haiti and Japan. Reasonbmor69 (talk) 00:34, 12 September 2018 (UTC)
 * Red information icon with gradient background.svg Not done: this is the talk page for discussing improvements to the template . Please make your request at the talk page for the article concerned. Primefac (talk) 00:38, 12 September 2018 (UTC)

Fix extra leading space displayed in Google search
Please remove all posibble spaces or fix other way (maybe Phab) problem that one space is displayed in Google search when displaying hover text of this template (because hover cannot be performed there, meaning is displayed i.e. hover text and not abbrev). I hope it is not a Google search problem itself, that it interprets abbr tags as with one extra space needed before displayed text.

I hope you will see first search result here (note that девојачки is spaced from left parenthesis with no reason i.e. it is wrong). Note also that I've removed spaces in sr.wiki template in hope that problematic space will dissappear but it has not yet. --5.43.99.155 (talk) 01:39, 26 September 2019 (UTC)
 * There are no extraneous spaces; the markup and parser functions go directly from the > of to the opening {{ of the switch statement, then back to the  immediately after the switch closes with }}. I would guess this is a Google thing. Primefac (talk) 02:46, 27 September 2019 (UTC)

Displaying strangely
For some reason, this template results in strange appearances on my Windows 10 machine. With the Cora template, for example, it looks a bit like ".c," but not quite - something funny is going on. This is the same on Google Chrome and Microsoft Edge. On Internet Explorer, it's a bit different - it seems that it's "c." with three dots just underneath it. Is this something other people see? If so, is anyone able to fix it, please? These are standard browsers so I’d hope this can be made to work OK? Thanks in advance - The Parson's Cat (talk) 21:37, 2 August 2020 (UTC)
 * I see circa as it should display (e.g. c. 2020) on Firefox. I'm thinking this might be a browser/computer issue on the OP's end, since abbr hasn't changed since 2016. Primefac (talk) 21:50, 2 August 2020 (UTC)
 * Whether the underline appears solid or dotted, the number and size of dots, and the position of the underline relative to the underlined text will all depend upon one or more of several factors: the fonts that are installed on your machine; the fonts that are bundled with your browser; how the browser interprets [//www.w3.org/TR/html51/textlevel-semantics.html#the-abbr-element the <abbr ></abbr> element], the [//www.w3.org/TR/CSS21/selector.html#attribute-selectors attribute selector], [//www.w3.org/TR/CSS21/box.html#propdef-border-bottom the  declaration] and [//www.w3.org/TR/css-text-decor-3/#text-decoration-property the   declaration] (not all recent browsers recognise this last one). Whilst all modern browsers recognise most of these constructs, they may do so in differing ways. Whichever one of these factors it is, this is a client-side issue and nothing that we can do anything about. -- Red rose64 &#x1f339; (talk) 11:54, 3 August 2020 (UTC)
 * Thanks for all your help. A quick bit of investigation suggests that if you have your browser 'Scale and layout' sizing in Windows 10 set to anything other than 100%, you will see problems in Chrome and Edge.  Looking at the code snippet above, I can't help wondering if it's that "1px dotted" that is the problem - it's an absolute measurement rather than a relative one.  I wonder if the same equivalent-nominal value in 'em' units rather than 'px' would fix the problem?  Is this something that might be worth a try, please?  The Parson's Cat (talk) 12:47, 4 August 2020 (UTC)

Remove third parameter
Please apply the sandbox (diff). It removes the third parameter function, which is unused (as far as evident by searching for ) and was inapprorpriate in the first place, since not only   does the job perfectly, the function never worked because the tooltip of IPA overrides the tooltip produced by :   → foo. Nardog (talk) 03:23, 2 September 2020 (UTC)

Incidentally, this also fixes the error demonstrated in Template:Abbr/testcases (real-life examples: Tales from the Mos Eisley Cantina, List of songs recorded by Iggy Azalea). Nardog (talk) 08:39, 2 September 2020 (UTC)
 * Yes check.svg Done Primefac (talk) 09:46, 2 September 2020 (UTC)