2003 Monash Web Workshop Series

How should we provide text equivalents for non-text elements on the web?

Summary

One of the most basic requirements for web accessibility is providing a text equivalent for non-text elements (images, frames, scripts, etc.). Both words in the phrase "text equivalent" are important. In this workshop, learn how to avoid some common mistakes when creating text equivalents.

The presentation covers the following topics:

This presentation was given as part of the Web Workshop series at Monash University on 20 March, 2003.

Dey Alexander
Usability Specialist, Web Resources and Development
IT Services Division, Monash University
Ph: +61 3 99054740
Email: dey.alexander@its.monash.edu.au

Created: 16 March, 2003 - Last updated: 22 April, 2003

What is a "text equivalent"?

"Text" is important because

"Equivalent" is important because

Which page elements require a "text equivalent"?

Checkpoint 1.1 (Web Content Accessibility Guidelines 1.0)

Providing text equivalents

References

Examples of common errors

The images below are screenshots showing a range of errors relating to the provision of text equivalents.

Image 1: image "alt" attribute error

This image shows a promotion for the new Harry Potter book "Harry Potter and the Order of the Phoenix" that appears on Amazon.com's home page. The image also shows my browser Element Properties dialogue box. I right-clicked over the image to produce this. You can see that the image has a missing "alt" attribute, so anyone who could not see the image, would miss out on this promotion entirely. The code snippet relevant to this image is displayed below.

Code snippet from Amazon.com home page

<img src="http://g-images.amazon.com/images/G/01/marketing/harrypotter2/top-center-hp5-0205.gif" width=257 height=99 border=0 valign=top align=center>

Image 2: image map "area" element error

The screenshot below is also from the Amazon home page and shows an image map used as a navigation bar.  Again, you can see my browser's Element Properties dialogue box showing that the image map area I right-clicked over has a missing "alt" attributes. The code snippet below the image shows this as well.

Code snippet from Amazon.com's home page

<map name="right_top_nav_map">
<area shape="rect" href=http://www.amazon.com/exec/obidos/shopping-basket/ref=top_nav_sb_gateway/102-2250618-4272948 coords="0,0,80,21">
<area shape="rect" href=/exec/obidos/wishlist/ref=cm_wl_topnav_gateway/102-2250618-4272948 coords="85,0,151,21">
<area shape="rect" href=/exec/obidos/account-access-login/ref=top_nav_ya_gateway/102-2250618-4272948 coords="155,0,256,21">
<area shape="rect" href=/exec/obidos/tg/browse/-/508510/ref=top_nav_hp_gateway/102-2250618-4272948 coords="260,0,299,21">
</map>

Image 3: java applet "alt" attribute error

The screenshot below shows the Charles Sturt University orientation page as analysed by The Wave. You can see that the scrolling news presentation is a java applet with no "alt" attribute. The code snippet below the image is taken from the site.

Code snippet from Charles Sturt University orientation page

<applet code=yavs.class width=200 height=43>
<param name="MSGTEXT" value="http://www.csu.edu.au/orient/news.txt">
<param name="BGCOLOR" value="#714DB8">
<param name="FGCOLOR" value="#FFCC00">
<param name="HREFCOLOR" value="#FFFFFF">
<param name="LINKCOLOR" value="#003366">
<param name="FONTNAME" value="Dialog">
<param name="FONTSIZE" value="12">
<param name="SPEED" value="30">
<param name="PAUSE" value="1500">
<param name="HPAD" value="5">
<param name="VPAD" value="5">
<param name="codeBase" value="http://www.csu.edu.au/division/humres/java">
<param name="code" value="yavs.class">
<param name="width" value="204">
<param name="height" value="89">
<param name="DESIGNTIMESP" value="10548">
<param name="DESIGNTIMEURL" value="http://www.csu.edu.au/division/humres/java">
<param name="_ExtentX" value="3969">
<param name="_ExtentY" value="2646">
</applet>

Image 4: Flash "noembed" element error

The screenshot below shows the use of a Flash object that provides navigation and content for The Prince web site. I've right-clicked over the element and this has opened a context menu that shows the object is Flash. The code snippet below the image is taken from the page and shows the failure to include a "noembed" element for those unable to access the content of the Flash object.

Code snippet from The Prince home page

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="58">
<param name=movie value="intro.swf">
<param name=quality value=high>
<embed src="intro.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="58">
</embed>
</object>

Image 6: "noframes" element error

The image below shows an inappropriate use of the "noframes" element, as used on the Australian Defence Force Academy web site. This element should be used to provide access to equivalent content, not to tell users that they are using a browser that does not provide support for frames. The code snippet below the image shows how this was generated.

Code snippet from the Australian Defence Force Academy web site

<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>

Images present the biggest problem

Images used to set tone or convey non-verbal messages

Eight types of problems with image "alt" attributes

  1. Image "alt" attributes that are not equivalent to the information conveyed by the image
  2. Image "alt" attributes that include unnecessary data
  3. Image "alt" attributes that are left blank
  4. Images without an "alt" attribute
  5. Background images that convey content - no "alt" can be provided
  6. Decorative/layout images with "alt" attributes that included unnecessary data
  7. Decorative/layout images without an "alt" attribute
  8. Images with text alternatives that are too long

1-5 relate to images that represent page content. 6-7 concern decorative or layout images. 8 could apply to either content or decorative images.

Examples of each of the eight problems

Problem 1: "Alt" attribute does not provide equivalent information

Example 1

The image below appears at the top of several pages on the Australian Catholic University web site. This one has been given a text alternative of "ACU locations". The text alternative is meta data rather than a description of the function of the image. A better text alternative might be "Australian Catholic University has campuses in Brisbane, Sydney, Canberra, Ballarat and Melbourne"

Example 2

The image below is from the my.monash portal for Monash University staff and students. It has been given a text alternative of "my.monash". The image provides more than just the site ID (which is provided elsewhere). It includes

Example 3

The image below is from the Murdoch University home page. It shows information about Orientation Week for students, including the date. The text alternative is simply "Orientation".

Problem 2: "Alt" attribute includes unnecessary data

Example 1

The image below is a text version of the Charles Sturt University home page. You can see that many of the image links have the unnecessary prefixes "-> Link to...", "-> Link - ... " or ">". A blind user wanting to quickly find the link "Prospective Students" would not do so when opening up link list provided by their screenreader and typing "P" to go to the list of links beginning with that letter.

Example 2

The image below shows a graphic navigation bar from the Victoria University home page where each option includes unnecessary text. Each link has the format "Graphic name link", e.g. "Graphic Contact us link"

Example 3

The image below is the University of Newcastle logo. On the University's home page, the logo image is in two slices. The first has the text alternative "Logo of the University of Newcastle, Australia" and the second has the unnecessary text alternative "logo".

Problem 3: "Alt" attribute is left blank

Example 1

The image below is from the Notre Dame University home page. The key navigational elements are images with blank "alt" attributes.

Example 2

The image below is from the University of Technology, Sydney homepage. The image "quicklinks" is a link to a list of commonly used pages on the site. However, the image has a blank "alt" attribute so would not be visible to users of screen or braille readers and text browsers.

Problem 4: "Alt" attribute is missing

Example 1

The image below is the home page of the National Institute of Dramatic Arts. None of the images have "alt" attributes. Blind users, or those using text browsers, would not receive any alternative content for the site title, logo, the image in the centre of the page, or any of the images on the right ("Stage Struck", "NIDA News",
NIDA Play Season 2002").

Example 2

The image below is shows how a text browser renders the Avondale College home page. None of the images have "alt" attributes, so the user agent compensates by including the text "inline" or "link". The latter is used where an image also acts as a link anchor. "Embed" indicates a Flash element without a text alternative. It would be impossible for a blind user to use this page.

Problem 5: A background image that conveys content

Example 1

The example below shows the prospective students page at the University of Canberra. You will notice the map of Australia in the background. The map shows the location of Canberra on the east coast of Australia, relative to Sydney and Brisbane. This information is not repeated anywhere on the page.

Problem 6: Decorative image has "alt" attribute that provides unnecessary data

Example 1

The images below are screenshots from the Monash University Faculty of Arts home page. The first shows the graphical view, and the second, a text view. As you can see, each of the decorative and layout images has a text alternative. An invisible image used to create space between elements has the text alternative "spacer". The folder icon beside the heading "For Students" has the text alternative "students icon". The book icon beside the heading "Resources" has the text alternative "resources icon". Each bullet point has the text alternative "bullet". The two photos have text alternatives "teach_img" and "student_img".

Example 2

The images below are from the Macquarie University prospective students page. The image at left shows the graphical view of a section of the page, while the image at right shows the text view. As you can see, the images that form the curved corners of the blue background have been given text alternatives, "curve".

Example 3

The image below shows the University of Western Australia home page. A decorative image at the top right of the screen has the unnecessary text alternative "Image showing Winthrop Hall in relief".

Problem 7: Decorative image has missing "alt" attribute

Example 1

The image below shows a snippet of the University of Wollongong home page as seen in a text browser. Two spacer images have no "alt" attribute and the browser compensates by including the word "inline".

Problem 8: Text alternative is too long

Advice on the use of "alt" attributes for images

Consider the purpose of the image

Check your text alternatives

References

Full list of references