Note on accessibility in SVG

In discussing the <image> tag, which is quite like the <img> tag in HTML, we are likely to be reminded of the importance, for accessibility reasons, of the "alt" attribute in HTML <img>. This brings up the larger issue of accessibility in SVG. It should be noted that the mere fact that SVG is XML, the content is already far more accessible than other image formats like JPEG, BMP, or PNG. But there is more that can and should be done within SVG documents. The following publications of the W3C are definitive:

We can glean from those documents that the use by authors of <title> and <desc> tags can be very important for increasing accessibility. Accordingly, the source code of many of these examples will contain additional markup that may not be exposed here for brevity and readability of the basic text. This does not, however, de-emphasize the importance of their use in actual SVG content. From the second reference:

title
Provides a human-readable title for the element that contains it. The title element may be rendered by a graphical user agent as a tooltip. It may be rendered as speech by a speech synthesizer.
desc
Provides a longer more complete description of an element that contains it. Authors should provide descriptions for complex or other content that has functional meaning.

Here is a simple example of how these might be used at the beginning of an SVG document. They may also be used with other elements within the document, and <image> would be a place that might seem most appropriate given the nature of the material being referenced.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
<title>Illustration of the use of SVG image tag</title>
<desc>An engraving of a fire engine taken from the 1911 Webster's Dictionary</desc>
<image x="15%" width="30%" y="15%" height="30%" xlink:href="fireenginefromWebsters1911.gif" />
</svg>

This discussion thread at www-svg@w3.org suggests that putting <title> and <desc> inside each meaningful object within an SVG document makes the most sense, and that the W3C will be producing new accessibility guidelines for SVG in the foreseeable future.

Accordingly, the following markup would probably be preferable, particularly for more complex documents and as assistive technologies become more sophisticated in dealing with SVG documents:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
<image x="15%" width="30%" y="15%" height="30%" xlink:href="fireenginefromWebsters1911.gif" >
<title>Illustration of the use of SVG image tag</title>

<desc>An engraving of a fire engine taken from the 1911 Webster's Dictionary</desc>
</image>
</svg>


Some possibly interesting discussion of "canonical discussions" and accessibility, together with a challenge to make the Wikipedia and Wikimedia Commons symbols for Public Domain and Copyrighted more accessible are presented below:
  1. http://www.mail-archive.com/svg-developers@yahoogroups.com/msg14173.html
  2. http://www.mail-archive.com/svg-developers@yahoogroups.com/msg14174.html