Template:Sronly/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

Include this template in instances where you need to have text on a page for the purpose of technology such as screen readers but which should not be displayed for those who have sight. Note that this is distinct from the CSS class display:none per https://cloudfour.com/thinks/see-no-evil-hidden-content-and-accessibility/#showing-additional-content-for-screen-readers.

For instance, books or magazines that use a decorative image for a first letter will need to have some way of communicating those ornate letters; alt text may describe the image itself but not this template will ensure that the actual character is included in the text for the purpose of screen reading, spellchecking, indexing for search engines, etc.

Example[edit]

At Page:The New Yorker 0001 1925-02-21.pdf/10, you could use the following code:

{{Img float
 | file     = The New Yorker 0001 1925-02-21 (page 10 crop) (cropped).jpg
 | width    = 200px
 | align    = left
 | alt      = A cartoon of a man at a typewriter with a large W to the right
}}{{sronly|W}}E shall say it is national election day, 1928.

to get:

A cartoon of a man at a typewriter with a large W to the rightWE shall say it is national election day, 1928.