| id | e7aa44 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | Audio element content has text alternative | ||||||||||||||||||||
| rules_format | 1.1 | ||||||||||||||||||||
| rule_type | composite | ||||||||||||||||||||
| description | This rule checks that `audio` elements have a text alternative available. | ||||||||||||||||||||
| accessibility_requirements |
|
||||||||||||||||||||
| input_rules |
|
||||||||||||||||||||
| acknowledgments |
|
This rule applies to any non-streaming audio element for which at least one of the following is true:
- has an
autoplayattribute value of true; or, - has a play button that is visible and included in the accessibility tree.
For each test target, the outcome of at least one of the following rules is passed:
This rule assumes that the language of each test target can be correctly determined (either programmatically or by analyzing the content), and sufficiently understood.
There are no accessibility support issues known.
- Understanding SC 1.2.1: Audio-only and Video-only (Prerecorded)
- G158: Providing an alternative for time-based media for audio-only content
This audio element has a play button, and there is a transcript of the audio.
<html lang="en">
<audio src="/test-assets/moon-audio/moon-speech.mp3" controls></audio>
<p>
The above audio contains the following speech: We choose to go to the moon in this decade and do the other things,
not because they are easy, but because they are hard, because that goal will serve to organize and measure the best
of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to
postpone, and one which we intend to win, and the others, too.
</p>
</html>This audio element has a play button, and the text on the page labels the audio as an alternative.
<html lang="en">
<p>
A part of a speech by John F. Kennedy: We choose to go to the moon in this decade and do the other things, not
because they are easy, but because they are hard, because that goal will serve to organize and measure the best of
our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to
postpone, and one which we intend to win, and the others, too.
</p>
<p>
You can also listen to the audio file below to hear the above part of the speech.
</p>
<audio src="/test-assets/moon-audio/moon-speech.mp3" controls></audio>
</html>This audio element autoplays, and there is a transcript of the audio.
<html lang="en">
<audio src="/test-assets/moon-audio/moon-speech.mp3" autoplay controls></audio>
<p>
The above audio contains the following speech: We choose to go to the moon in this decade and do the other things,
not because they are easy, but because they are hard, because that goal will serve to organize and measure the best
of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to
postpone, and one which we intend to win, and the others, too.
</p>
</html>This audio element has a play button but has an incorrect transcript.
<html lang="en">
<audio src="/test-assets/moon-audio/moon-speech.mp3" controls></audio>
<p>
The above audio contains the following speech: We are going to the North Pole in this decade with puppies, not
because they are easy, but because they are cute, because that goal will serve to organize and measure the best of
our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to
postpone, and one which we intend to win, and the others, too.
</p>
</html>This audio element autoplays but the text transcript is not visible on the page.
<html lang="en">
<p style="display: none;">
A part of a speech by John F. Kennedy: We choose to go to the moon in this decade and do the other things, not
because they are easy, but because they are hard, because that goal will serve to organize and measure the best of
our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to
postpone, and one which we intend to win, and the others, too.
</p>
<p>
You can also listen to the audio file below to hear the above part of the speech.
</p>
<audio src="/test-assets/moon-audio/moon-speech.mp3" autoplay controls></audio>
</html>This audio element does not autoplay or have a play button.
<html lang="en">
<audio src="/test-assets/moon-audio/moon-speech.mp3"></audio>
</html>This audio element is labeled as an alternative by text on the same page, but the controls are not visible on the page.
<html lang="en">
<p>
A part of a speech by John F. Kennedy: We choose to go to the moon in this decade and do the other things, not
because they are easy, but because they are hard, because that goal will serve to organize and measure the best of
our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to
postpone, and one which we intend to win, and the others, too.
</p>
<p>
You can also listen to the audio file below to hear the above part of the speech.
</p>
<audio src="/test-assets/moon-audio/moon-speech.mp3" controls style="display: none;"></audio>
</html>This a element links to an audio file, but there is no audio element on this page.
<html lang="en">
<p>
A part of a speech by John F. Kennedy: We choose to go to the moon in this decade and do the other things, not
because they are easy, but because they are hard, because that goal will serve to organize and measure the best of
our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to
postpone, and one which we intend to win, and the others, too.
</p>
<p>
<a href="/test-assets/moon-audio/moon-speech.mp3">Download the speech as MP3</a>
</p>
</html>