• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Screen reader-only/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Screen reader-only

This is the template sandbox page for Template:Screen reader-only (diff).
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 49,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Redirects
  • {{sronlyTemplate:Sronly}}
  • {{sroTemplate:Sro}}
CSSThis template uses TemplateStyles:
  • Template:Screen reader-only/styles.css

This template generates invisible text that will be read aloud by screen readers. The text supplied as the sole unnamed parameter is not to be displayed in a browser, but should be voiced by a screen reader.

First part. {{Screen reader-only|Second part only for a screen reader.}} Third part. → First part. Second part only for a screen reader. Third part.

This template should only be used to hide text from sighted readers when that text substantially duplicates adjacent text that is visible.

Contents

  • 1 In table captions
  • 2 Example
    • 2.1 Example table
    • 2.2 TemplateData
  • 3 See also

In table captions

edit

The main usage case is when a table is placed immediately below a heading, where the heading is effectively identical to the table's caption. This template may be used to hide the caption from a sighted reader (as it would be duplicative), while allowing a screen reader to hear the caption – for example, if the screen reader reads a list of tables in the article to allow navigation directly to a particular table.

If the table is moved to another ___location away from the heading, then this template should be removed to allow sighted readers to see the table caption. This is a requirement of WCAG 1.3.1.

Example

edit

The table below has a caption "Example table" that will be voiced by a screen reader.

|+ {{Screen reader-only|Example table}}

Example table

edit
Example table
Header Information
Row hdr 1 data 1
Row hdr 2 data 2
Row hdr 3 data 3

TemplateData

edit
See a monthly parameter usage report for Template:Screen reader-only in articles based on its TemplateData.

TemplateData for Screen reader-only

The text supplied is not to be displayed in a browser, but should be voiced by a screen reader.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text1

no description

Stringrequired

See also

edit
  • {{Transparent text}}
  • {{Hidden text}}
The above documentation is transcluded from Template:Screen reader-only/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Screen_reader-only/sandbox&oldid=1191976538"
Last edited on 26 December 2023, at 22:48

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 26 December 2023, at 22:48 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop