Jump to content

Template talk:Tooltip

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Test

[edit]

This is a tooltip which does not wrap correctly?

In FireFox 1,5 the tooltip is just short. In IE6 the tooltip is long.

Well in Safari it wraps beautifully: only to go away before you have time to finish reading it! —Ian Spackman 19:58, 21 May 2007 (UTC)[reply]
Seems to work in ie6 for me just fine. My buddy is a mediawiki admin and he would love this thing. Is this supported in all versions? ClintonKu (talk) 21:15, 24 May 2009 (UTC)[reply]
[edit]

{{editprotected}}

checkY Done Harryboyles 17:15, 27 August 2008 (UTC)[reply]

Merge with {{abbr}}

[edit]

This template does the same as {{abbr}}, but without using the HTML tag <abbr> or the class abbr. — Dispenser 14:35, 10 October 2009 (UTC)[reply]

Why not make this more like a navigation popup?

[edit]

Why not make this more like a navigation popup? Then we could put links in it too. Lemmiwinks2 (talk) 03:41, 14 October 2009 (UTC)[reply]

See Wikipedia:Tools/Navigation popups. This feature must be installed by the user, and requires that their browser has JavaScript support enabled. – Wbm1058 (talk) 13:36, 12 June 2015 (UTC)[reply]

Redirects for deletion.

[edit]

I have started a redirects for deletion discussion. If someone could replace the page with {{subst:rfd|content=#REDIRECT [[Template:Abbr]] {{R from merge}}}}, that would be appreciated. E to the Pi times i (talk | contribs) 04:08, 31 March 2018 (UTC)[reply]

 Done Galobtter (pingó mió) 12:24, 31 March 2018 (UTC)[reply]

Template-protected edit request on 1 January 2021

[edit]

Update TfD template, as I re-listed the discussion to 1 January. –Piranha249 21:40, 1 January 2021 (UTC)[reply]

 Not done: I've undone the relist; it's already been relisted twice. Primefac (talk) 21:44, 1 January 2021 (UTC)[reply]

Template-protected edit request on 27 January 2021

[edit]

This template was approved for a merger with Template:Hover title earlier this month, but nothing has come of the effort since then. –Piranha249 (Discuss with me) 18:17, 27 January 2021 (UTC)[reply]

This isn't an edit request. Template mergers sometimes take time. Please be patient. Primefac (talk) 18:27, 27 January 2021 (UTC)[reply]

Why does our documentation flout the rules?

[edit]

I'm puzzled that the documentation contains a warning which is viewed as serious enough that it deserves all bold:

Please note: Do not use {{abbr}} or <abbr> to mark up material other than abbreviations (including acronyms). Using it to generate tooltips elsewhere is a misuse of the underlying HTML and causes accessibility problems. For general-purpose tooltips, use {{tooltip}} instead.

Then goes on to give a usage example which is a formula not an abbreviation, and that example uses {{abbr}} rather than {{tooltip}}.

I recognize that this classic formula includes some abbreviations, but I don't think combining abbreviations into a formula makes it an abbreviation. I'm not fully grasping why {{abbr}} creates an accessibility problem while {{tooltip}} does not, but unless I'm missing something, if we strongly urge editors to use tooltips for things other than abbreviations shouldn't we use tooltip in the documentation? Am I missing something?--S Philbrick(Talk) 21:45, 12 May 2021 (UTC)[reply]

@Sphilbrick: ... I'm missing something ... I'm not sure what's going on here, but I've highlighted quoted text to make it clear what you are talking about. Feel free to wrap the said warning into a {{notice}} template to make it more readable. On the other side, I think it's legit to avoid using tooltips. It certainly would cause readability issues on different devices. AXONOV (talk) 18:55, 13 May 2021 (UTC)[reply]
Alexander Davronov, I get that pop-ups might create problems related to accessibility (and I don't know this for certain, it just sounds plausible), but I'm struggling to understand why a popup created by tooltips is problematic but a pop up created by abbr is not a problem. (thanks for the highlighting to clarify what I am talking about.) S Philbrick(Talk) 20:05, 13 May 2021 (UTC)[reply]
@Sphilbrick: I agree that it sounds plausable. Probably underlaying html tags and scripts cause issues with accessibility on devices not fully supporting html/js/css but I'm confused too here tbh. Cheers. AXONOV (talk) 20:11, 13 May 2021 (UTC)[reply]

Dotted not working in new vector

[edit]

The css class explain used by this template is not supported in new vector and hence tooltips are never dotted in that skin. This can be solved by moving the doting to template styles as I've done at Template:Tooltip/sandbox. I would like to have someone more experienced have a look at it before implementing though. Thanks to Izno for helping out at discord full credits for anything clever I say to them. --Trialpears (talk) 16:47, 7 August 2021 (UTC)[reply]

Looks fine. Izno (talk) 17:34, 8 August 2021 (UTC)[reply]
Now implemented. --Trialpears (talk) 12:41, 9 August 2021 (UTC)[reply]

 You are invited to join the discussion at Wikipedia:Village pump (technical) § Italics in a tooltip. {{u|Sdkb}}talk 22:02, 17 October 2021 (UTC)[reply]

Template-protected edit request on 9 July 2023

[edit]

Update this template to the current sandbox version. The added line {{sronly|Tooltip {{#if:{{{3|}}}|{{{3|}}}|{{{2}}}}}}} will cause the tooltip text to be read aloud as "Tooltip {parameter as written}". A version of this was tried before, but it caused an unspecified error when used outside of the testcases page [1]. This version is slightly less complex and a minor error has been since corrected in the live template. When testing this template on Firefox, Chrome, Edge, IE, NVDA, and Windows 10, I don't notice any issues in or out of the sandbox. An example of the sandbox version: conflict of interestTooltip in the specific sense employed in Wikipedia policy Feel free to ask any questions or for any specific testing Rjjiii (talk) 21:37, 9 July 2023 (UTC)[reply]

 Completed. P.I. Ellsworth , ed. put'er there 17:09, 11 July 2023 (UTC)[reply]
eraser Reverted. P.I. Ellsworth , ed. put'er there 17:59, 11 July 2023 (UTC)[reply]

Template-protected edit request on 11 July 2023

[edit]

Revert previous update. In most situations this works fine, but sometimes when used within a link it will either display the Template:sronly text inline, suppress the link, or suppress the tooltip. This may the same issues that SMcCandlish noted as it works fine in the sandbox and in many mainspace contexts. Rjjiii (talk) 17:46, 11 July 2023 (UTC)[reply]

More context for future editors. This is a bug in {{sronly}} unrelated to tooltips. When placed within a link, it can cause issues. The most common is that the intended hidden text is printed inline. I'm not sure what causes the stylesheet conflict, but it shouldn't be used in links or templates that are linked until fixed. Rjjiii (talk) 17:56, 11 July 2023 (UTC)[reply]
eraser Reverted. P.I. Ellsworth , ed. put'er there 18:00, 11 July 2023 (UTC)[reply]

Dotted line working in preview mode, but not in saved article mode

[edit]

It's really weird: [2]. I have tried purging the page and using a different browser but the problem remains. Any ideas? Betty Logan (talk) 11:45, 14 August 2023 (UTC)[reply]

Template:efn will work better in that situation. Using a tooltip will make the content unavailable to most readers including everyone on mobile, and not accessible for users using a screen reader or keyboard navigation. Regards, Rjjiii (talk) 16:14, 14 August 2023 (UTC)[reply]
Better yet, rewrite the sentence to avoid using film jargon. Something like: "Since Fox, to save costs, had long ago destroyed the negatives of the outtakes and portions of scenes that were cut during editing of the film, traditional outtakes could not be included." – Jonesey95 (talk) 01:59, 15 August 2023 (UTC)[reply]
How dare you say something commonsensical!  — SMcCandlish ¢ 😼  04:54, 15 August 2023 (UTC)[reply]
Surely there's a notice board for such things? Rjjiii (talk) 05:49, 15 August 2023 (UTC)[reply]
I appreciate the suggestions, but a problem bypassed is not a problem solved. There would still appear to be a glitch in the template. Betty Logan (talk) 08:20, 15 August 2023 (UTC)[reply]
It appears to be because the first use of the template in the article (in the infobox) is inside a link, where TemplateStyles doesn't work. In any case this template should never be used in the main namespace (MOS:NOTOOLTIPS). (The infobox use is a double whammy as it also violates MOS:SMALLTEXT.) Nardog (talk) 08:53, 15 August 2023 (UTC)[reply]
Thanks! I've removed the first hover box and now we've now got a dotted line. I will sort out the second one with a footnote when I get a chance. Very strange that the first instance was disrupting the second instance, but at least you have satisfied my curiosity. Betty Logan (talk) 09:24, 15 August 2023 (UTC)[reply]

TemplateData

[edit]

This template shares TemplateData with {{abbr}} via the documentation. I think only the first bit (This template defines an abbreviation or acronym, by creating a tooltip that is displayed on mouse-over.) needs to be changed. Should this be made more general so that the TemplateData applies to both {{abbr}} and {{tooltip}}, or should {{tooltip}} use its own TemplateData with a separate explanation? Rjjiii (talk) 06:39, 14 January 2024 (UTC)[reply]

The description "Meaning" for |2= also does not seem valid for {{Tooltip}}. I think this template should have its own TemplateData, which can probably be transcluded using an #if statement that checks the page name. – Jonesey95 (talk) 07:18, 14 January 2024 (UTC)[reply]
Oh, good catch. I've added separate descriptions for {{tooltip}}'s TemplateData. I also made the descriptions shorter, so they would not be cut off in the VisualEditor's template search box, Rjjiii (talk) 16:47, 15 January 2024 (UTC)[reply]

Prefer the larger dots used for Template:Abbr

[edit]

The {{tooltip}} dots are so small they are hard to see for the less eagle-eyed among us.

I prefer the dot size in {{abbr}}.

big dots {{abbr|big dots}}

little dots {{tooltip|little dots}}

It is more obvious with big dots that one is not looking at a typical underlined link found elsewhere on the web.

The little dots could be mistaken for a link line since they are so small. In dark mode the dots seem to be gray on black which makes them even harder to distinguish. The big white dots are so much better.

Also, in dark mode in article namespace table cells with background colors have black underlined links. For example, this table (scroll down):

{{tooltip}} dots could be mistaken for more links in that table.

That table uses {{abbr}} in the headers. Big dots. No mistaking them for typical underlined links.

For more info see:

--Timeshifter (talk) 16:40, 27 July 2025 (UTC)[reply]

I see a thin underline just below the letters in the first example (abbr), and a more substantial, dotted underline with some vertical spacing below the letters in the second example (tooltip). The tooltip example is the one that looks better to me. In dark mode, all of the dots are the same color as the text (nearly white). Note: the above is in Firefox, logged in. In Chrome, I see fatter dots under abbr; everything else is the same. – Jonesey95 (talk) 19:16, 27 July 2025 (UTC)[reply]
I clarified which is which in my first post.
In Firefox in Windows 10 Pro on a big screen I am seeing the opposite of you. What OS, device, and screen are you using?
I looked in Firefox in an iPad 2020 and things are weirder still. The dot size and spacing is the same for both tooltip and abbr. But there are 2 lines of dots for abbr.
In Chrome on Win 10 Pro the dots are the same as what I see on Firefox on Win 10 Pro: Big more widely spaced dots for abbr, and small tightly spaced dots for tooltip. --Timeshifter (talk) 19:37, 27 July 2025 (UTC)[reply]
Would changing the CSS for this template from a dotted bottom border to text-decoration: underline dotted; make them look the same regardless of browser? I think it would but maybe there is some issue that I have overlooked. Either way, I don't have any strong opinions on the appearance. They both look fairly similar on Firefox, Chrome, Gnome Web (Webkit), and Pale Moon running on Linux Mint. On Chrome, I agree with Jonesy above. Maybe a font issue, but the fat dots on Chrome are less distinct from the text (maybe this is why a bottom border was used to begin with?). Rjjiii (talk) 00:20, 28 July 2025 (UTC)[reply]
An example as people are comparing:
  • big dots? {{tooltip|big dots?}}
  • big dots {{abbr|big dots}}
  • little dots {{tooltip|little dots}}
That uses inline CSS mentioned in my first post. I think it should render the same. No strong opinions on the original concern, Rjjiii (talk) 00:25, 28 July 2025 (UTC)[reply]
Just tested on other devices. Older version of Safari still in use and Internet Explorer don't support this. That is most likely why it's done as a border. Rjjiii (talk) 00:35, 28 July 2025 (UTC)[reply]

Template:Tooltip/styles.css uses border-bottom: 1px dotted;

You tried text-decoration: underline dotted; for it:

{{tooltip|big dots?|style=text-decoration: underline dotted; border-bottom: none;}}
big dots?

It makes for bigger dots. I like it. Is that what {{abbr}} uses? I can't tell by looking at its source. And I don't see a CSS file for {{abbr}}. --Timeshifter (talk) 19:58, 28 July 2025 (UTC)[reply]

Again, those dots are tiny for me (Firefox for Mac OS, latest build), so tiny that they look like a very thin gray underline. The ones that use border-bottom: 1px dotted; are much better. As for a CSS file for Template:abbr, it looks like it doesn't use one; instead, I suspect, each browser has its own method of marking <abbr>...</abbr> tags, which is why Chrome and Firefox look different from each other while Template:tooltip looks the same on both browsers. I recognize that Firefox is a minority browser at this point, and that Chrome rules the roost, so if you want to make tooltip and abbr match each other, it's OK by me. You might get some pushback from users of non-Chrome browsers, though. – Jonesey95 (talk) 20:17, 28 July 2025 (UTC)[reply]
I agree about tooltip and abbr matching each other. Overall, the bigger dots show up for more people when tooltip and abbr match each other by using whatever abbr is using. There are a lot more Firefox users on PCs than Macs. And abbr uses big dots on Firefox and Chrome on PCs. --Timeshifter (talk) 20:58, 28 July 2025 (UTC)[reply]
On Firefox and Chrome, <abbr> defaults to "text-decoration-line: underline; text-decoration-style: dotted;" Not on Safari though. I tried breaking it out like that rather than shorthand. An iPhone (new ones even) render {{tooltip}} and {{abbr}} exactly the same currently. Changing tooltip to look more like Chrome's rendering, would make them different. I don't see much benefit since it still doesn't offer consistency. Sorry if I got any hopes up, there, Rjjiii (talk) 02:33, 29 July 2025 (UTC)[reply]
{{abbr}} looks better on Chrome and Firefox on PCs. So changing {{tooltip}} to whatever abbr is using would mean more people overall would benefit from the big dots. Since most people use Chrome and Firefox on PCs.
How does abbr look on Android phones?
Worldwide: "Android market share (as of the end of 2024) stands at 70.93%, while iPhone market share for the same period is 29.07%."
https://wezom.com/blog/iphone-vs-android-users-key-differences-in-2025
abbr dots {{abbr|abbr dots}}
tooltip dots {{tooltip|tooltip dots}}
--Timeshifter (talk) 15:09, 29 July 2025 (UTC)[reply]