Template:Tooltip/testcases

Finding test cases in articles

The following search links may be of assistance in finding actual usage of the template in articles.

Basic test set

These are tests of using Template:Sronly inside Template:Tooltip, for accessibility improvements.

With no link, inside or outside the template

The most basic use case.

Code:

{{tooltip/sandbox|conflict of interest|in the specific sense employed in Wikipedia policy}}

Sandbox template output:

conflict of interestTooltip in the specific sense employed in Wikipedia policy

Current template output (lacks sronly):

conflict of interest

Linking around the template was what we've been recommending for years, due to the old Chrome bug.

Code:

[[WP:COI|{{tooltip/sandbox|conflict of interest|in the specific sense employed in Wikipedia policy}}]]

Sandbox template output:

conflict of interestTooltip in the specific sense employed in Wikipedia policy

Current template output (lacks sronly):

conflict of interest

This will also do the link internally to the template; boo-hoo for people using Chrome from many years ago. They have bigger problems than this, like massive security holes.

Code:

{{tooltip/sandbox|WP:COI|conflict of interest|in the specific sense employed in Wikipedia policy}}

Sandbox template output:

WP:COITooltip in the specific sense employed in Wikipedia policy

Current template output (outright broken for this use case, as it only accepts two parameters, not three):

WP:COI

Using the "link" parameter

This is a shorthand way to link the term, if the resulting target will be a real page (and the intended one). It had the same old Chrome-bug issue, but no one seemed to care, and it doesn't matter today anyway.

Code:

{{tooltip/sandbox|link=yes|WP:Conflict of interest|in the specific sense employed in Wikipedia policy}}

Sandbox template output:

WP:Conflict of interestTooltip in the specific sense employed in Wikipedia policy

Current template output (lacks sronly):

WP:Conflict of interest

Manually linking the term inside the template

This was not advised because of a Chrome bug, but it is long since fixed. However, there is a still a problem: the link automatically has a title supplied by MediaWiki (the page name), and this in most browsers will override the tooltip title of the surrounding span. So, the intended tooltip will actually only be available to:

  1. screen readers
  2. in any graphical browser case in which a link is included but is not the entire term content, in which case the intended tooltip will be available when focus is over the span but is not over the part that is a link.
  3. in a graphical browser that doesn't treat link titles as tooltip but only as something to show in some other interface element such as the window footer (and here it will not matter if the entire term content is a link or not).

For this reason, the template instructions to prefer wrapping the template in the link should be retained, along with addition of the new three-parameter version ({{tooltip|linkTarget|termText|tooltipText}}).

Code:

{{tooltip/sandbox|[[WP:COI|conflict of interest]]|in the specific sense employed in Wikipedia policy}}

Sandbox template output:

conflict of interestTooltip in the specific sense employed in Wikipedia policy

Current template output (lacks sronly):

conflict of interest


Using the dotted=no parameter

Code:

{{tooltip/sandbox|conflict of interest|in the specific sense employed in Wikipedia policy|dotted=no}}

Sandbox template output:

conflict of interestTooltip in the specific sense employed in Wikipedia policy

Current template output (lacks sronly):

conflict of interest


Hebrew text

Code:

{{tooltip/sandbox|תוכן נִסתָר|תוכן ברור|dotted=no}}

Sandbox template output:

תוכן נִסתָרTooltip תוכן ברור

Current template output (lacks sronly):

תוכן נִסתָר

Double quotes in title text

Code:

{{tooltip/sandbox|conflict of interest|often abbreviated "coi"}}

Sandbox template output:

conflict of interestTooltip often abbreviated "coi"

Current template output (lacks sronly):

conflict of interest

Parenthesized text testcases

B. Screen reader test cases against sandbox2

Test B-1: clunky test copied straight out of another discussion

LIVE:

"{{Tooltip|Inside these double quotes is a test|and here is the pop-up tip!}}" ⟶ "Inside these double quotes is a test"

SANDBOX2:

"{{Tooltip/sandbox2|Inside these double quotes is a test|and here is the pop-up tip!}}" ⟶ "Inside these double quotes is a test"

Test B-2: Linked TKO example from doc page

LIVE:

[[Knockout#Technical knockout|{{tooltip|TKO|technical knockout}}]]TKO

SANDBOX2:

[[Knockout#Technical knockout|{{tooltip/sandbox2|TKO|technical knockout}}]]TKO

Test B-3: using dotted=no param

LIVE:

{{tooltip|conflict of interest|in the specific sense employed in Wikipedia policy|dotted=no}}}conflict of interest

SANDBOX2:

{{tooltip/sandbox2|conflict of interest|in the specific sense employed in Wikipedia policy|dotted=no}}conflict of interest

Test B-4: reading a foreign language pop-up

LIVE:

{{tooltip|Goldilocks and the Three Bears|Ricitos de Oro y los tres osos}}Goldilocks and the Three Bears

SANDBOX2:

{{tooltip/sandbox2|Goldilocks and the Three Bears|Ricitos de Oro y los tres osos}}Goldilocks and the Three Bears

Test B-5: right-to-left script (Hebrew) and dotted=no

LIVE:

{{tooltip|תוכן נִסתָר|תוכן ברור|dotted=no}}תוכן נִסתָר

SANDBOX2:

{{tooltip/sandbox2|תוכן נִסתָר|תוכן ברור|dotted=no}}תוכן נִסתָר

Test B-6: link=yes; punct and specials in the plain text

LIVE:

{{Tooltip|Cupronickel|75% copper, 25% nickel|link=yes}}Cupronickel

SANDBOX2:

{{Tooltip/sandbox2|Cupronickel|75% copper, 25% nickel|link=yes}}Cupronickel

Test B-7: bold markup in plain text

LIVE:

{{Tooltip|'''$31,152,975'''|Career prize money}}$31,152,975

SANDBOX2:

{{Tooltip/sandbox2|'''$31,152,975'''|Career prize money}}$31,152,975

Test B-8: non-Latin script in plain text, dotted=no

LIVE:

{{Tooltip|ई|ī|dotted=no}}

SANDBOX2:

{{Tooltip/sandbox2|ई|ī|dotted=no}}

Test B-9: italic markup in plain text, non-Latin script in long pop-up, dotted=no

LIVE:

{{Tooltip|''Voyage with a Tail Wind''|simplified Chinese: 顺风相送; traditional Chinese: 順風相送; pinyin: Shùnfēng Xiāngsòng|dotted=no}}Voyage with a Tail Wind

SANDBOX2:

{{Tooltip/sandbox2|''Voyage with a Tail Wind''|simplified Chinese: 顺风相送; traditional Chinese: 順風相送; pinyin: Shùnfēng Xiāngsòng|dotted=no}}Voyage with a Tail Wind

Sandbox3

Uses CSS for the "tooltip" instead of HTML.

  • (r. (reign) 1441–1487)
    from Thailand, modified to include style= and link=
  • Refs. (References)
    from Dwayne Johnson, modified to include id=
  • Peak (Highest position attained in the chart)
    from The Lord of the Rings (film series)
  • W–L (Win–loss)
    from Serena Williams
  • M (Previous rank)
    from Ultimate Fighting Championship
  • In a table:
    from Ultimate Fighting Championship
Rank ISO Fighter Record Win streak M (Previous rank) Weight class Status Next fight
Event Opponent Ref. (References)
1 Georgia (country) Ilia Topuria 17–0 17 Steady Lightweight Lightweight Champion
2 Russia Islam Makhachev 27–1 15 Steady Lightweight #1 in lightweight rankings
3 Georgia (country) Merab Dvalishvili 20–4 13 Steady Bantamweight Bantamweight Champion UFC 320 Cory Sandhagen
4 United Arab Emirates Khamzat Chimaev 15–0 15 Increase +10 Middleweight Middleweight Champion
5 Brazil Alexandre Pantoja 30–5 8 Decrease −1 Flyweight Flyweight Champion
6 Australia Alexander Volkanovski 27–4 1 Steady Featherweight Featherweight Champion
7 Russia Magomed Ankalaev 20–1–1 (1 NC) 3 Steady Light Heavyweight Light Heavyweight Champion UFC 320 Alex Pereira
8 Australia Jack Della Maddalena 18–2 18 Steady Welterweight Welterweight Champion
9 England Tom Aspinall 15–3 3 Steady Heavyweight Heavyweight Champion UFC 321 Ciryl Gane
10 Brazil Alex Pereira 12–3 0 Steady Light Heavyweight #1 in light heavyweight rankings UFC 320 Magomed Ankalaev
11 South Africa Dricus du Plessis 23–3 0 Decrease −7 Middleweight #1 in middleweight rankings
12 United States Max Holloway 27–8 1 Decrease −1 Lightweight #3 in lightweight rankings
13 United States Belal Muhammad 24–4 (1 NC) 0 Decrease −1 Welterweight #1 in welterweight rankings
14 Armenia Arman Tsarukyan 22–3 4 Decrease −1 Lightweight #2 in lightweight rankings
15 Kazakhstan Shavkat Rakhmonov 19–0 19 New entry Welterweight #3 in welterweight rankings

Sandbox4

The tooltip's content remains accessible on hover for desktop users.

Asterisk or # as first character in tooltip parameter 1

{{Tooltip|**|No data}}
Side by side comparison
{{Tooltip}}{{Tooltip/sandbox}}
** **Tooltip No data
{{Tooltip|##|No data}}
Side by side comparison
{{Tooltip}}{{Tooltip/sandbox}}
## ##Tooltip No data

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.