Exercise: Adding a longdesc attribute to the Customer Satisfaction Survey Pie Chart
Use of the longdesc provides the opportunity to give a longer description, or explanation, than those provided by either the alt or title attribute. This is useful when providing information about the content of complex charts or diagrams.
Open the tutorial file 'aboutjoe.php' and look for the image tag used to display the Pie Chart (line 110).
<img src="images/chart3.GIF" alt="Customer Satisfaction Survey" width="367" height="225" hspace="10" border="0" >
This Pie chart shows the results of a customer satisfaction survey carried out by Joe Light (Joe Light is our imaginary photographer on the tutorial website) . The text used to summarize the information in the pie chart is too long to be displayed using an alt attribute; the longdesc attribute can be used instead.
Add the longdesc attribute to the img tag as shown in the following example,
<img src="images/chart3.GIF" alt="Customer Satisfaction Survey" width="367" height="225" hspace="10" border="0" longdesc="satisfaction.php" >
The web page satisfaction.php already exists and contains a text description of information shown visually in the pie chart. Many screen readers provide access to the longdesc link, making the content available to users.
The longdesc attribute is currently only supported by Netscape 6. If you have access to Netscape 6, right-click the Pie Chart image and select 'Properties' from the menu. In the 'Properties' window click on the description link. The web page pointed to by the longdesc link should open in your browser.
