• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Screen reader-only

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
(Redirected from Template:Sronly)

Template documentation[view] [edit] [history] [purge]
CSSThis template uses TemplateStyles:
  • Template:Screen reader-only/styles.css

Contents

  • 1 Screen reader only
  • 2 Usage
    • 2.1 Table captions
  • 3 Example
    • 3.1 Example table
    • 3.2 TemplateData

Screen reader only

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.

Usage

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

Table captions

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

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

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

Example table

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

TemplateData

Click here to see a monthly parameter usage report for this template based on this 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

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text1

no description

Stringrequired
The above documentation is transcluded from Template:Screen reader-only/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Screen_reader-only&oldid=30079"
Categories:
  • Templates using TemplateStyles
  • Templates using TemplateData
  • Wikipedia templates that change text based on client state
Last edited on 26 October 2021, at 12:23

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 26 October 2021, at 12:23.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop