WikiQueer:Alternative text for images

Alternative text is text associated with an image that serves the same purpose and conveys the same essential information as the image. In situations where the image is not available to the reader (perhaps because they have turned off images in their web browser, or are using a screen reader due to a visual impairment) the alternative text ensures no information or functionality is lost. Absent or unhelpful alternative text is a source of frustration for blind users of the Web.

On WikiQueer, alternative text is typically supplied through a combination of the image caption and the text supplied for the image  parameter in the MediaWiki markup. The following example produces the image on the right: ""

The  parameter text ("Painting of Napoleon Bonaparte") is not normally visible to readers but may be displayed by web browsers when images are switched off, is read out loud by screen readers for those with visual impairment, and can be used by search engines to determine the content of the image. In keeping with other Internet guidelines, the term " text" (in a   font) is used here to refer to the text supplied for the image   parameter and which generates text for the HTML alt attribute; the term "alternative text" refers to the text equivalent for an image, regardless of where that text resides.

For images that link to their image description page (which is nearly all images on WikiQueer), the  text cannot be blank nor should the   parameter be absent. This is because a screen reader, in order to describe the purpose of the link, will default to reading out the image filename when no  text is available. This is usually not helpful: in the above Napoleon example the screen reader would have read out "link graphic slash Jacques hyphen Louis underscore David underscore zero one seven" had we not supplied the  parameter.

An image that is purely decorative (provides no information and serves only an aesthetic purpose) requires no alternative text. Often the caption fully meets the requirements for alternative text. However, the only situation where blank  text is acceptable is where such images are unlinked, which is rarely possible. One solution is to provide something at least minimally useful such as photograph, painting, or sculpture. Another solution, if the caption doesn't already describe or identify the image, is for the  text to do so as briefly as possible.

Audience
The audience for alternative text includes:
 * readers with visual impairment of varying degrees who browse WikiQueer using a screen reader that translates text into speech or Braille, such as JAWS, NVDA or Orca;
 * readers using browsers that do not support images (e.g., Lynx), or that are configured not to display them;
 * search-engine bots.

Experiencing WikiQueer with a screen reader requires practice. An alternative is to install the Fangs add-on for Firefox, which displays the words spoken by a screen reader. An experienced screen-reader user may choose to skip portions of the text.

Basics
Alternative text should be short, such as "A basketball player" or "Tony Blair shakes hands with George W. Bush". If it needs to be longer, the important details should appear in the first few words, which helps the screen reader user to skip past the key points. Very long descriptions can be left for the body of the article. MediaWiki does not support HTML's longdesc attribute. All readers will be aware this element is an image, so adding "photograph of" isn't usually necessary.

The  text should consist of plain text (no HTML or Wiki markup such as wikilinks) and be all on one line. The text must comply with Neutral point of view, Verifiability, No original research, and Biographies of living persons. Since it cannot contain inline citations it must not convey any contentious point, or material not obvious to any reader. The  text is read out by screen readers just before the caption, so try to avoid having the same details in both.

Importance of context
Understanding the context of an image is vital. The World Wide Web Consortium (W3C) Web Content Accessibility Guidelines (WCAG) 2.0 recommends editors consider four questions:


 * Why is this non-text content here?
 * What information is it presenting?
 * What purpose does it fulfil?
 * If I could not use the non-text content, what words would I use to convey the same function and/or information?

For example, an image of Napoleon Bonaparte could be used in


 * an article on great military leaders where it illustrates an example of such a leader—the alternative text should name subject;
 * an article on Napoleon illustrating what he looked like—the alternative text should briefly describe his appearance if it matters to the article;
 * an article on a painting of him—the alternative text should briefly describe the painting.

Images that contain words
If an image contains words important to the reader's understanding, the alternative text should contain those words. If it contains non-Latin characters, consider providing a transliteration. Screen readers without Unicode support will read a character outside Latin-1 as a question mark, and even in the latest version of JAWS, the most popular screen reader, Unicode characters are very difficult to read.

Captions and nearby text

 * For details of the wiki markup that produces these elements, see WikiQueer:Extended image syntax.

Images are typically thumbnails with captions. The caption is visible to all readers, and can contain HTML markup, wikilinks and inline citations. An infobox often contains a plain image with the caption as a separate row. The caption may describe the image, identify its subject, or contain material that has nothing to do with the image.

Where the caption is sufficiently descriptive or evocative of the image, or where it makes clear what the function of the image is, one option is to write refer to caption. Where nearby text in the article performs the same function, it can be refer to adjacent text. Where the caption does not describe or identify the image, but the image is merely decorative, the  text should contain the shortest possible description or identification of the image.

Maps and diagrams
With maps, diagrams and charts, the colour, position, and size of elements are not important. Instead, concentrate on the information being presented. For example a chart may have alternative text "Sales in June, July and August", and a diagrammatic animation may have alternative text "Animation of a car engine in motion". The structural formula of a chemical compound can be unambiguously described using IUPAC nomenclature and the drug or chemistry infoboxes include this information.

Examples
{| class=wikitable !width="170"|Normal viewing !width="200"|Screen reader !width="300"|Rationale
 * - style="border-top:2px solid black"
 * colspan=4 style="border-left:2px solid black;border-right:2px solid black"|
 * style="border-left:2px solid black; border-bottom:2px solid black"|Dannebrog.jpg design still in use is Denmark's 13th-century Dannebrog.]]
 * link graphic A red flag divided into four by a white cross slightly offset to the left. The oldest link national flag design still in use is link Denmark's 13th-century link Dannebrog
 * style="border-right:2px solid black"| Article: Flag The purpose of the image is to show what Denmark's Dannebrog flag looks like. The photograph could be replaced by a flat graphic and serve the same purpose. Therefore the flagpole, the fluttering and the sky are not important.
 * colspan=4 style="border-left:2px solid black;border-right:2px solid black"|
 * style="border-left:2px solid black"|Glass-half-full.jpeg .]]
 * link graphic Clear water pours from a spout. Fluoridation does not affect the appearance, taste or smell of link drinking water.
 * style="border-right:2px solid black"|Article: Water fluoridation This is a stock photograph chosen to decorate a sound bite from the article regarding tap water. The image is a link so it needs
 * - style="border-bottom:2px solid black"
 * style="border-left:2px solid black"|Blair Bush Whitehouse (2004-11-12).jpg
 * link graphic Tony Blair and George W. Bush shaking hands at a press conference. Blair and Bush agree on a strategy for peace in the Middle East on 12 November 2004.
 * style="border-right:2px solid black"|The image shows them greeting each other with a handshake during a press conference. The  tag]] does not currently support   tag]] generates an image with no   tag]] is used to generate math formulae. These may be rendered as an image or using text, depending on their complexity and user preferences. For simple formulae, use the  " will cause the MediaWiki software to render HTML with an empty   tag. When the image is a link, screen readers will read out the link filename (e.g., "slash green underscore tick") if the HTML   to the image wiki markup. Removing the link is acceptable for images in the public domain or the equivalent CC0. Links should not be suppressed for any image that requires attribution.
 * style="border-left:2px solid black"|Blair Bush Whitehouse (2004-11-12).jpg
 * link graphic Tony Blair and George W. Bush shaking hands at a press conference. Blair and Bush agree on a strategy for peace in the Middle East on 12 November 2004.
 * style="border-right:2px solid black"|The image shows them greeting each other with a handshake during a press conference. The  tag]] does not currently support   tag]] generates an image with no   tag]] is used to generate math formulae. These may be rendered as an image or using text, depending on their complexity and user preferences. For simple formulae, use the  " will cause the MediaWiki software to render HTML with an empty   tag. When the image is a link, screen readers will read out the link filename (e.g., "slash green underscore tick") if the HTML   to the image wiki markup. Removing the link is acceptable for images in the public domain or the equivalent CC0. Links should not be suppressed for any image that requires attribution.

Most of the images within WikiQueer articles do not serve an active function; they are not buttons or menu options. Where the image serves as a link to another article, name the article in the alternative text. Where following the link performs an operation (such as sort), indicate the operation. Don't say "click here" or "link to" as the reader will already know the image is a link and may not be clicking a mouse button on it.