[whatwg] Alt attribute for <video> and <audio>

On 10/08/2009 15:42, Remco wrote:
> On Mon, Aug 10, 2009 at 8:53 AM, Benjamin Hawkes-Lewis<bhawkeslewis at googlemail.com> wrote:
>> Do these features meet your requirements? If not, why not?

> A longdesc is not the same as an alt, in that a longdesc is a long
> description of the content, while an alt is alternative actual
> content.

Maybe. Does any W3C recommendation use those precise words to 
distinguish them?

> This distinction may in practice be unnecessary though. And I
> see that the WAI has redefined alt to mean a short description.

HTML 4.01 implementations must treat "alt" as defined in the HTML 4.01 
specification.

HTML5 implementations would have to treat "alt" as defined in the HTML5 
specification.

WAI have not redefined the semantics of W3C markup languages, though 
they are defining ARIA markup that (it is proposed) will override the 
native semantics of those other languages in ARIA implementations.

In terms of your question about whether "video" element should allow an 
"alt" attribute, I was looking at:

    * How the editorial draft of HTML5 defines "alt".
    * The WCAG 2.0 Recommendation's conformance requirements for text 
alternatives for media.

I regard discussing how HTML 4.01 defines "alt" and how WCAG 1.0 or WAI 
Notes suggest using "alt" in the context of HTML 4.01/XHTML 1.x as a 
distraction when trying to answer your question.

It seems to me that:

    1. Publishers do not need "alt" on "video" to meet WCAG 2.0's 
conformance requirements.
    2. Adding "alt" to "video" would not meet any other use cases.
    3. /If/ I'm wrong and we do need another mechanism to provide a text 
alternative to meet WCAG 2.0's conformance requirement, it would be 
better to supply a mechanism that allows markup (e.g. of changes of 
language and of changes of speaker).

Do you agree with these claims?

> Does this mean that the alt attribute and longdesc attribute for
> images can be combined and deprecated in favor of aria-describedby or
> a figure/legend combo?

Controversially, "longdesc" is not conforming markup in the HTML5 
editor's draft because of a track record of poor implementations in the 
web corpus and popular user agents:

http://blog.whatwg.org/the-longdesc-lottery

This is an open issue for the HTML WG:

http://www.w3.org/html/wg/tracker/issues/30

The WAI-CG Task Force on Alternative Text has recommended that 
"longdesc" only be obsoleted /if/ "aria-describedby is incorporated in 
HTML5" and "aria-describedby allows pointing to long text alternatives 
that are off of the page (by pointing to a link on the page)":

http://www.w3.org/2009/06/Text-Alternatives-in-HTML5

I'm suggesting that one could use various /existing/ HTML5 features to 
provide distinct "short descriptions" (i.e. titles) and "long 
descriptions" (i.e. transcripts) for "video" and "audio" elements.

"alt" is problematic for providing text alternatives, since as an 
attribute it cannot contain markup (e.g. to indicate changes of 
language). But it is useful for "alt" to continue to be conforming on 
elements that currently have an "alt" attribute since:

    1. Many text alternatives do not need markup
    2. "alt" more widely supported by user agents than alternatives like 
"aria-label" or "aria-labelledby".
    3. "alt" is unambiguously available for all user agents rather than 
relegated to being provided only to system accessibility APIs.

"alt" on "video", on the other hand, is supported by no popular user 
agents, whereas heading elements, "legend", "title", "aria-label", and 
"aria-labelledby" already are supported by some user agents.

> It would make the HTML spec more consistent.

Perhaps. But interoperability may be more important.

> One advantage of this is that the alternative content is now by
> default always visible (or can be made visible in the case of
> <details>). That makes it much more useful for normal use cases (no
> network problems or disabled audience), which means it would be
> provided a lot more. This is a lot better than the current situation
> with alt.

This touches on some frequently debated points:

1. Are people more likely to provide text alternatives when they are 
visible?
2. Are such text alternatives likely to be /actual/ text alternatives or 
will they be more like captions that assume people can see the image?

> The question now is: why would we need both <figure>  and aria-describedby?

"figure" is an HTML5-specific technology for use by all user agents that 
indicates a figure.

"aria-describedby" is an HTML-and-XML-general technology that points to 
a description to be exposed to system accessibility APIs.

So they are rather different.

--
Benjamin Hawkes-Lewis

Received on Monday, 10 August 2009 08:55:32 UTC