Repost based on comments by Charles McCathie Nevile (Chaals)
This post was originally titled “Avoid Using Longdesc for 508 Compliance”. Fortunately, two readers kindly pointed out that longdesc is actually a great way to make your web site more accessible. So I have edited the post, leaving in my summary of the way to use longdesc, and following up with a very detailed discussion of the longdesc attribute provided by Chaals.
Section 508, paragraph 1194.22 suggests the using longdesc for 508 compliance. The longdesc attribute is used to provide a link to a page containing a long description of an image:
<img src="graph.jpg" alt="Types of disabilities" longdesc="description.htm">
In this example, the page “description.htm” should contain a long description of the image.
Below is the text of Chaals’ original detailed explanation of longdesc.
Also published at http://chaals.ya.ru/
Charles McCathie Nevile is Co-Chair of W3C’s HTML Task Force on Accessibility.
“Below first I explain the current implementation situation, then how longdesc should be used, why it should be used, and finally I explain why I request that the advice given in this blog post (and repeated) be set aside.
While most browsers don’t support longdesc natively, most browser/screen-reader combinations do – whether it is in HTML4 or HTML5 pages. A prime audience in accessibility terms is likely to be screen reader users, and longdesc works for them.
When used correctly a longdesc is generally available to users of screenreaders other than VoiceOver, users of the Opera and iCab browsers, and users of various extensions in Firefox, Chrome, Internet Explorer, Opera, Yandex, and perhaps other browsers.
2. How to use longdesc.
Longdesc is an appropriate part of a solution strategy to ensure accessibility of content whose default communication is through images.
Including a clearly visible link to the description, or the description itself, on the page, tightly associated with the image, is often an improvement on longdesc for a number of users. A longdesc and a normally visible redundant link is probably the best of a range of poor options readily available today. Note that while it is legitimate to use an in-page link with longdesc, such as
this does not work in the JAWS screenreader due to a bug.
As noted elsewhere on this blog it is helpful to ensure that when descriptions are required, they are available to more people than the categories listed above. The strategies offered meet that requirement, and the important requirement to make sure the description is explicitly linked to the image being described. However, they are generally verbose, which makes them far from optimal in many cases.
Some replacement strategies that have been used, such as using an invisible image are clearly far worse, since they reduce the number of people to whom the description is readily available. Other techniques which involve linking to text on the page which is normally hidden generally cause as many problems as they solve, and are not useful as solutions.
3. Why do it that way?
The question of whether a long description should be directly included in a page, or linked to, depends on two related factors. The first is re-use. If the image is going to be used in multiple places, it helps maintenance and user recognition if the same description is linked each time. (Incidentally, this can also help search engines and similar quality measurements, although that should not be a primary consideration). The second is “cognitive load”. Forcing extra content in the page is in itself usually detrimental. Even for screen-reader users, it adds to the navigational complexity of the page while they probably don’t want to read the entire description every time they encounter the image. Ideally, the alt attribute is enough for them to identify it if they have already read through the description.
Using an invisible image is a terrible idea, since it will only be available to a subset of screenreader users and people who use the keyboard for navigation – possibly a smaller group than those who can directly benefit from a longdesc attribute today (although I am guessing since I don’t have good research on the question).
Using normally hidden elements is generally a bad idea. Most mechanisms fail to take account of significant user groups such as those who use high-contrast or high zoom, and who in many cases will find a description more useful than the original image. They also increase the complexity of navigation, because users who can see and hear the page will lose track of where they are.
4. How is this advice harmful? (The original advice to Avoid longdesc)
Like many important features, longdesc took years to be implemented by screen readers. The most recent implementation in a popular screenreader, NVDA, was held back in the explicit hope that Firefox would introduce native support in the browser, and the authors on reluctantly took on the task themselves when it became clear that this would take far longer.
Browser implementation has been resisted in places because HTML 5 *currently* doesn’t have a longdesc attribute. However, as part of “Plan-2014″, W3C’s official roadmap to complete HTML5 in 2014, there is an “extension specification” describing how to include longdesc. Given that there are a number of important implementations (as well as those mentioned above, it is supported by important authoring software), it is quite possible that HTML5 will include longdesc when it beomes a Recommendation (that’s what W3C calls its completed standards) – or even that the longdesc extension becomes a W3C Recommendation before HTML5.
One part of the discussion hinges on arguments about how much longdesc is used, how often it is used correctly, and how often advice is given to avoid its use. To the extent that this blog is influential, it is likely to have an impact on the future of the longdesc attribute and its usage.
I hope that I have shown why the advice given in this post is detrimental, and I hope that it will be explicitly retracted. While longdesc is not an ideal solution to a complex problem, 5 years of heated discussion have failed to produce an alternative that is as good, while longdesc does seem to meet the requirements of users, authors, implementors, and even specification editors.
Note. I’m co-chair of W3C’s HTML Task Force on Accessibility, the author of the “HTML5 Image Description Extension” specification that defines longdesc for HTML5 (or any other version), I was responsible for getting longdesc natively implemented in the Opera browser, I have written extensions for other browsers, and I have worked on this issue since 1997. So I may be knowledgeable – but I am unlikely to be unbiased.”
Chaals & Laura’s original comments on my advice to avoid longdesc appear below: