Skip to main content

Audio

The HTML <audio> element is used to play an audio file on a web page.

  • A text alternative must be provided to the user
  • Captions should be provided for all prerecorded content in synchronized media
    • Captions of all dialogue and important sounds should be visible.
    • An alternative for time-based media or audio descriptions must be provided.
  • Users should be advised when any user interface component setting changes or receives focus, if it affects the context is affected, prior to their implementation.
  • Also see WCAG 4.1.1 and 4.1.2 for markup requirements.

Audio

Example HTML usage:
<audio controls>
  <source src="../assets/img/uspto-audio.mp3" type="audio/mpeg" />
  <p>
    Your browser does not support embeded audio. Here is a
    <a href="../assets/img/uspto-audio.mp3">link to the audio</a> instead.
  </p>
</audio>

Video

The HTML <video> element is used to show a video on a web page.

  • A text alternative must be provided to the user.
  • Captions must be provided for all prerecorded content in synchronized media.
    • Captions of all dialogue and important sounds should be visible.
  • A correct reading sequence should be programmed when the sequence in which content is presented affects meaning.
  • Also see WCAG 4.1.1 and 4.1.2 for markup requirements.

Video

Example HTML usage:
<video id="myVideoWithControls" width="350" height="200" controls>
  <source src="../assets/img/uspto-video.mp4" type="video/mp4" />
  Your browser does not support embeded video.
</video>

Captions and subtitles video

Example HTML usage:
<video
  id="myVideoWithCaptions"
  width="350"
  height="200"
  controls
  preload="metadata"
>
  <source src="../assets/img/uspto-video.mp4" type="video/mp4" />
  <track
    label="English"
    kind="subtitles"
    srclang="en"
    src="../assets/img/captions-en.vtt"
    default
  />
  Your browser does not support embeded video.
</video>