HTML and CSS Reference
In-Depth Information
The HTML5 specification says that all child elements of audio other than source should
be ignored. This means that providing additional fallback content won't result in any
negative consequences for a user on an HTML5-capable browser.
For example, you could include fallback Flash:
<audio controls>
<source src="audio.ogg">
<source src="audio.mp3">
<object data="player.swf?audio=audio.mp3">
<param name="movie" value="player.swf?audio=audio.mp3">
Video and Flash are not supported by your browser.
</object>
</audio>
Or you could simply describe what the audio file contains and include a link to the file
for a user to download and play on his device's media player (along with some gentle
encouragement to upgrade to a new browser):
<audio controls>
<source src="audio.ogg">
<source src="audio.mp3">
Your browser does not support HTML5 audio. You should upgrade. In the
meantime, download <a href="audio.ogg">episode 42 of Learning to Love
HTML5</a>.
</audio>
Accessible alternatives
Another challenge with HTML5 audio is that alternative content for multimedia
doesn't quite exist in practice. Theoretically , accessibility would be delivered through
two steps: first, multimedia authors include a subtitles file in the container .ogv
or .mp3 , and then browsers give users an interface to access those subtitles and captions.
Using the alt attribute with img isn't a practical solution. It isn't what
the HTML5 specification intends, and, more important, assistive tech-
nologies don't process audio fallback content in that fashion.
For now, there's not much more than a few experimental approaches you can try:
• Accessible HTML5 Video with JavaScripted captions: http://dev.opera.com/arti
cles/view/accessible-html5-video-with-javascripted-captions/
• HTML5 and Timed Media: http://www.bbc.co.uk/blogs/rad/2009/08/html5.html
• Demos of HTML5 Video and Audio Tag Accessibility: http://www.annodex.net/
~silvia/itext/
You may note that some of these resources reference video. That's because HTML5
audio and video are so similar that the approaches described can be applied to both (as
discussed in Chapter 5 ).
 
Search WWH ::




Custom Search