Author: rob
Description:
HTML 4.01 provides for a longdesc attribute which accepts a URI linking to a resource or resource fragment for a description of any image embedded in a page. MediaWIki currently requests an image description from editors and provides a link to the overall page about an uploaded image/media resource. However, by providing a longdesc URI to the description itself, this would aid assistive technology in finding the description in a standardized manner.
Simplest fix:
add an id attribute to the meidai file’s description table cell and then add a longdesc attribute to the img element which references just the description fragment.
Better fix:
check for non-empty content of the description cell of the table and include a longdesc attribute on the image only when that description is populated.
The longdesc attribute is not suitable for ornamental images, however for most of the images and media uploaded by editors, the longdesc is suitable and quite appropriate. Especially where the accompanying article might discuss salient features of the image immediately apparent to sighted readers, the longdesc can fill in the missing gaps for visually impaired users or users otherwise unable to load and view the accompanying image (because of their client application’s capabilities, bandwidth limitations ,etc.).
As an example in a Wikipedia article which embeds an image from the WIkiMedia commons (adding the longdesc attribute and the id attribute for fragment reference and indicating added text by wrapping in three asterisks *** ):
<a href="/wiki/File:filename.file-extension" class="image" title="<Title>">
<img alt="" *** longdesc="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/filename.file-extension/225px-filename.file-extension#description" *** src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/filename.file-extension/225px-filename.file-extension" width="225" height="270" />
</a>
Then on the uploaded media page (the id attribute added to the table cell containing the actual description):
<th style="background: #ccf; text-align: right; vertical-align: top; padding-right: 0.4em; width: 15%" id="fileinfotpl_desc">Description
</th>
<td * id="description" *>
<span class="summary" style="display:none"><filename>.<file-extension> </span> <p>[A user/editor entered description of the subject, and salient visual properties of the image] </p>
</td>
Version: unspecified
Severity: enhancement