Abstract

This specification defines a longdesc attribute to extended
descriptions to images in HTML5-based content

Status of This Document

THERE ARE EDITORIAL AND CODING ERRORS IN THIS DOCUMENT.

This section describes the status of this document at the time of
its publication. Other documents may supersede this document. A list
of current W3C
publications and the latest revision of this technical report can be
found in the W3C
technical reports index at http://www.w3.org/TR/.

This document is an editors' draft proposed to the HTML Working Group
Accessibility Task Force as an HTML extension. This document is intended
to become a W3C
Recommendation. If you wish to make comments regarding this document,
please send them to public-html-a11y@w3.org
(subscribe,
archives).
All feedback is welcome.

Publication as a Working Draft does not imply endorsement by the W3C
Membership. This is a draft document and may be updated, replaced or
obsoleted by other documents at any time. It is inappropriate to cite
this document as other than work in progress.

Introduction

HTML 4 provided a longdesc attribute for the img
element. This enabled a machine-discoverable description of an image to
be linked to the image. This extension specification defines the same
functionality for HTML5-based content.

1. Conformance

As well as sections marked as non-normative, all authoring guidelines,
diagrams, examples, and notes in this specification are non-normative.
Everything else in this specification is normative.

The key words must, should,
and
may
in this specification are to be interpreted as described in [RFC2119].

Requirements phrased in the imperative as part of algorithms (such as
"strip any leading space characters" or "return false and terminate
these steps") are to be interpreted with the meaning of the key word
("must", "should", "may", etc) used in introducing the algorithm.

Conformance requirements phrased as algorithms or specific steps may be
implemented in any manner, so long as the end result is equivalent. (In
particular, the algorithms defined in this specification are intended to
be easy to follow, and not intended to be performant.)

When a method or an attribute is said to call another method or
attribute, the user agent must invoke its internal API for that
attribute or method so that e.g. the author can't change the behavior by
overriding attributes or methods with custom properties or functions in
ECMAScript.

If an algorithm calls into another algorithm, any exception that is
thrown by the latter (unless it is explicitly caught), must cause the
former to terminate, and the exception to be propagated up to its
caller.

1.1 Dependencies

The IDL fragments in this specification must be interpreted as
required for conforming IDL fragments, as described in the Web IDL
specification. [WEBIDL]

Some of the terms used in this specification are defined in [DOM4],
[HTML5].

2. Use Cases and Requirements

There are many ways to ensure that users do not need to see images in
order to successfully interact with content. The alt attribute is
designed to ensure that for everyday work, a user has enough information
to replace an image, and often this is more helpful than a detailed
description of every image.

@@This needs to be completed - I have content to add (there has been a
lot of discussion of this over the years).

3. The longdesc attribute

Authoring requirement: the link is to part of a document,
the description should be contained within
an element which is the target of the link.

User agents should make the link available
to users, and should expose the link to
relevant APIs, especially accessibility-oriented APIs.

User agents should allow users to determine
when images in a page contain a long description.

If a longdesc attribute has invalid content, user
agents may make that content available to
the user, since a common error is to include the text of a description
instead of a URL as the value of the attribute.

for (i in describedImages) { if (i.longdesc) //there are a couple of extra things matched window.open(i.longdesc);}

A. Acknowledgements

Thanks to the HTML Working group of the late 1990s for the original
specification of longdesc, and to many many people involved with the
development of HTML5 for the discussion that led to this
specification. I haven't named them: the list might be larger than the
content of the specification.