No longdesc attribute in HTML5
According to an HTML Working Group Decision, the
longdesc attribute will not be included in the HTML5 specification. Not everybody is happy with that decision, so whether
longdesc is still out when HTML5 is finished remains to be seen.
In case you aren’t familiar with the
longdesc attribute, here is how it is described in the HTML 4.01 specification:
This attribute specifies a link to a long description of the image. This description should supplement the short description provided using the alt attribute.
This provides a way of describing images to non-sighted users in detail, with more text than what is suitable for the
alt attribute (which is really more of a text alternative to an image than a description of it). The
longdesc attribute explicitly associates this description with the image.
Whether or not you find it necessary to use
longdesc to describe the images you publish depends on the kind of images you use. In my experience, most images don’t need a longer description than what is provided by the
alt attribute. Though if you use a lot of complicated diagrams or flowcharts, chances are you have some images that need long descriptions that explains them to your non-sighted visitors.
longdesc attribute is not the only way of providing a longer description of an image. See the WebAIM article Creating Accessible Images – Long Descriptions for examples of other techniques. These include describing the image in the document itself and using a normal text link to a separate page.
Very often either of these methods work well, but they have problems too:
- The description is not programmatically associated with the image like it is when the
longdescattribute is used.
- They affect the visual display of the content by requiring a lot of visible text or a link to the description. In some cases this will not be allowed by style guidelines. An accessibility-conscious author can under such circumstances use the
longdescattribute to provide a link to a description without affecting the visual design at all.
longdesc attribute is not perfect. It is rarely used and its contents are hidden or difficult to access for many users who would benefit from it. But in some specific situations it may be still be the best choice, so I really don’t see why it needs to be removed, especially considering that HTML5 is intended to be “backwards-compatible”.
Other discussions about the removal of the
- CSSquirrel: Comic Update: Alone In The Pitch Black Dark
- Web Axe: Podcast #83: Fate of Longdesc in HTML5