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

Philip Jägenstedt philipj at opera.com
Wed Aug 12 01:57:43 PDT 2009

On Wed, 12 Aug 2009 01:09:16 +0200, Remco <remco47 at gmail.com> wrote:

> As a small part of integrating the ideas of ARIA into existing HTML 5,
> I just got an idea for a better solution for replacement content for
> video and audio: <source>.
> The source element is used to provide media elements with multiple
> sources. What if one of those sources could be an element on the page
> itself? The text is just another source which could link off-page, or
> on-page.
> <video>
> <source type="video/theora" src="primary-content.ogg">
> <source type="text/html" src="#alternate-content">
> <source type="text/html" src="alternate-content.html">
> </video>
> Alternative content in <source> which comes from an element on the
> same page is an extension to what you already know, and it doesn't
> require you to know about a special accessibility part of HTML.
> In addition: currently, <source> is only used for <audio> and <video>,
> but why not extend it to any external element?
> <iframe src="primary-content.html"><!-- legacy -->
> <source type="text/html" src="primary-content.html">
> <source type="text/html" src="#alternate-content">
> <source type="text/html" src="alternate-content.html">
> </iframe>
> <object><source ... ><source ... ></object>
> <embed><source ... ><source ... ></embed>
> <img><source ... ><source ... ></img>
> That last one may be problematic, since img-elements have
> traditionally never had a closing tag. I don't know how browsers will
> react to something like that. Maybe it would be better to have alt=
> and longdesc= remain for the img-element, and give longdesc the
> aria-describedby functionality (it could link to an element on the
> same page) in addition to the original meaning.

Before suggesting any changes to the <source> element, make sure you have  

Put simply, the handling of <source> is already quite complex, overloading  
it with completely different meanings is not a good idea. <video> won't  
handle "text/html" as a source, but if you want different media files for  
different audiences I suggest experimenting with <source media>.

Philip Jägenstedt
Core Developer
Opera Software

More information about the whatwg mailing list