Access 1.1.2.1

From Htmlpedia
Jump to: navigation, search

Access: [1.1.2.1]: <img> missing 'longdesc' and d-link (Priority 1)

Cause:

If "alt" text cannot adequately describe an image's function or purpose, provide access to a more complete description via the "longdesc" attribute. Note you must also add a d-link (descriptive link) because many current browsers do not support the "longdesc" attribute. The advantage of including "longdesc" in current web documents is that the description will remain accessible when newer browsers deprecate d-links.

Example:

Bad
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>aert1.0/1.1.2</title>
</head>
<body>
<p><img src="pie-chart.jpg" alt="Pie chart of federal expenditures" /></p>
</body>
</html>

Solution:

Good
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>aert1.0/1.1.2</title>
</head>
<body>
<p>
<img src="pie-chart.jpg" alt="Pie chart of federal expenditures" longdesc="expenditures.html" />
<a href="expenditures.html">d</a>
</p>
</body>
</html>

References: