[whatwg] Alt attribute for <video> and <audio>
remco47 at gmail.com
Wed Aug 12 07:51:05 PDT 2009
On Wed, Aug 12, 2009 at 3:52 PM, Philip Jägenstedt<philipj at opera.com> wrote:
> The resource selection algorithm loops through the source elements and when
> it reaches the last one just waits for another source element to be
> inserted. It doesn't make any distinction between static markup and elements
> inserted via DOM, so even if you have <video><source></video> in your
> markup, it will still wait for another source element to be inserted via
> DOM. This is for spec simplicity basically, I'm not saying that it's a
> brilliant use case in itself.
> The spec says:
> In addition to the above, the user agent may provide messages to the user
> (such as "buffering", "no video loaded", "error", or more detailed
> information) by overlaying text or icons on the video or other areas of the
> element's playback area, or in another appropriate manner. [end quote]
> Trying to specify exactly when such extra overlays are appropriate is
> difficult, because it's really just a guess. Something like when parsing has
> finished, there are no more source elements and no scripts running that
> might insert more of them. But that would be wrong sometimes, you have no
> way of predicting what future scripts might do.
OK, so an alt entry in the spec should not mandate its display at a
specified situation, but could just suggest it as a possible "more
detailed information". So the spec would become:
In addition to the above, the user agent may provide messages to the
user (such as "buffering", "no video loaded", "error", the contents of
the alt attribute, or other more detailed information) by overlaying
text or icons on the video or other areas of the element's playback
area, or in another appropriate manner.[end quote]
>> If videos are desirable and available, but text is also desirable,
>> then the alt text could be displayed/spoken/etc when you tab onto it,
>> as Silvia Pfeiffer proposed in a previous email.
> I believe that was accomplished with some kind of ARIA attributes, correct
> me if I'm wrong.
I'm no expert on ARIA, but as far as I know it can be done with
aria-labelledby. This is pretty complicated though. You have to
provide an additional element, style or hide it, and reference it
through aria-labelledby. It's pretty DIY. This looks like another
longdesc fiasco to me. It has other more realistic uses such as making
existing elements (forms, etc) accessible, but I don't see it getting
used for arbitrary alternate content.
It would be a lot nicer if a web author could just provide an alt text
which would show up when the video doesn't load for whatever reason. I
don't think it's possible to create an easier tool for web authors to
make a video somewhat accessible.
Same stuff applies to <audio>, <iframe>, <object>, <embed>, <img>.
More information about the whatwg