Template:Hover title/doc

From imedwiki
< Template:Hover title
Jump to navigation Jump to search

Purpose

This template assigns an HTML title attribute to a given block of text. This causes a tooltip to be displayed when the user hovers over the text with their cursor, on systems where that is possible.

Note that such content is not visible to, for example, users on mobile devices (who comprise more than half of all Wikipedia readers).

Usage

{{Hover title
 |spantitle
 |label
 |link=yes/no (defaults to "no")
 |dotted=yes/no (defaults to "yes")
}}

wikimarkup except linking may be used within label, but not within spantitle.

Examples

  • {{Hover title|Hello|example}} produces example.
  • {{Hover title|Hello|example|link=yes}} produces example.
  • {{Hover title|Hello|example|dotted=no}} produces example.
  • {{Hover title|Hello|example|link=yes|dotted=no}} produces example.
  • {{Hover title|Hello|ex'''amp'''le}} produces example.
  • [[example|{{Hover title|Hello|text}}]] produces text.

Accessibility issue

This template uses a hover attribute, which is discouraged by Wikipedia:Manual of Style (accessibility)#Text.

For marking abbreviations specifically, please use {{abbr}} instead, because it is accessible to screen reader users.


This template is based (in parts) on the Template:Hover title/doc from the free encyclopedia wikipedia and is licensed under GNU license for free documentation and the Creative Commons Attribution/Share Alike. On wikipedia there is a List of authors accessible. More about importing from wikipedia on page Imedwiki:Importing from wikipedia.