Ta̱mpi̱let:Screen reader-only/doc
This is a documentation subpage for Ta̱mpi̱let:Screen reader-only. It contains usage information, categories and other content that is not part of the original ta̱mpi̱let page. |
This template is used on approximately 3,400 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. |
This template uses TemplateStyles: |
This template generates invisible text that will be read aloud by screen readers.
Screen reader only
[jhyuk a̱tyin ka]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
[jhyuk a̱tyin ka]This template should only be used to hide text from sighted readers when that text substantially duplicates adjacent text that is visible.
Table captions
[jhyuk a̱tyin ka]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 captionTa̱mpi̱let:Snd 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
[jhyuk a̱tyin ka]The table below has a caption "Example table" that will be voiced by a screen reader.
|+ {{Screen reader-only|Example table}}
Example table
[jhyuk a̱tyin ka]Header | Information |
---|---|
Row hdr 1 | data 1 |
Row hdr 2 | data 2 |
Row hdr 3 | data 3 |
TemplateData
[jhyuk a̱tyin ka]TemplateData for Screen reader-only
The text supplied is not to be displayed in a browser, but should be voiced by a screen reader.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Text | 1 | no description | String | required |