Home Accessibility Tables Supply Long Descriptions   |   Search MS Office A-Z   |   Search Web Pages/ Design A-Z

Supply Long Descriptions

Defining a LONGDESC attribute requires a little more work than basic ALT text descriptions. That's because it actually refers to another Web page, so you'll have to create a separate HTML page that contains the longer descriptive text.

But the basic syntax needed to add it to the IMG tag is simple:

<img src="image.gif" height="250" width="320" alt="short descriptive text" longdesc="longerText.html">

Creating a LONGDESC value is a three-step process:

  1. Add a short description using the ALT attribute. That is helpful if the image doesn't load at all.
  2. Write your longer descriptive text and place it on a new Web page that retains the same look and feel of your other pages.
  3. Include that new page's URL as the value for the LONGDESC attribute.

This attribute is not well-supported by browsers now, but including it doesn't break your page.

In the meantime, consider this interim solution that's also noted at the W3C Web site:

"For user agents that don't support "longdesc", provide a description link as well next to the graphic."

In the previous coding example, we defined an image with an ALT text description and a LONGDESC link. Here, we'll add a "description link" (called a D-Link) as recommended by the W3C and the US Government's Usability and Accessibility Web site:

Just add a short text link after your image. Write the text link as a capital letter D enclosed in two brackets: [D].

<img src="image.gif" height="250" width="320" alt="short descriptive text" longdesc="longerText.html"> <a href="longerText.html" title="longer description of the image">[D]</a>

This makes your descriptive text accessible to all visitors. The downside is that the D-Link is visible on the page and may be distracting to some visitors.

Some Web designers use a single-pixel gif as a D-Link instead of creating a text link. That's small enough that it won't break the page layout. Visitors can also tab to it, so it's useful for keyboard navigation. An image D-Link would appear next to the larger image, but be an image link instead of a text link:

<img src="image.gif" height="250" width="320" alt="short descriptive text" longdesc="longerText.html">

<a href="longerText.html" title="descriptive text about the previous image"> <img src="single.gif" height="1" width="1" alt="link to longer descriptive text"> </a>

Note that the HREF value "longerText.html" is the same for both images. This gives visitors access to the same page whether or not their browsers support LONGDESC.

It just takes a few minutes and a little extra code to increase the accessibility level of your page. If you think that visitors with disabilities aren't worth your time, consider that you're also preparing your Web site for other technologies as well: PDAs, cell phones, and other wireless technologies where text descriptions are often far more useful than complex, slow-loading graphics.