HTML / Element / Initial coverage

The <audio> Element

Status: Initial coverage Scope: HTML Living Standard Spec reviewed: 2026-09-26

Technical Summary

audio is an embedded-content element whose media data is ostensibly audio. It participates in the shared HTMLMediaElement processing model used for resource selection, network and ready states, the media timeline, playback promises, and media events.

The HTML Standard permits both audio and video to handle media containing audio and video. Their main difference is that audio has no playback area for visual content such as video or captions. Keep normative processing, browser policy, codec support, native controls, and accessibility API observations as separate evidence.

Definition / Categories

ItemDefinition
MeaningPlays a media resource whose data is ostensibly audio in a document
CategoriesFlow, phrasing, and embedded content. With controls, it is also interactive and palpable content
ContextWhere embedded content is expected
Content modelThe presence of src changes whether child source elements are allowed and their order. Both forms allow zero or more track elements followed by transparent content, but no descendant media elements
Tag omissionNeither the start tag nor the end tag can be omitted
Content attributesGlobal attributes, src, crossorigin, preload, autoplay, loop, muted, controls, and loading
DOM interfaceHTMLAudioElement, which inherits from HTMLMediaElement

Content model and resource selection

Whether an audio element has a src attribute determines which child elements are permitted. When using child source elements, list candidates in document order and provide a type when known.

ConditionChild modelBoundary
With srcZero or more track elements, followed by transparent contentNo child source elements
Without srcZero or more source elements, zero or more track elements, then transparent contentTransparent content cannot contain descendant media elements
<audio controls preload="metadata">
  <source src="/media/lesson.ogg" type="audio/ogg; codecs=opus">
  <source src="/media/lesson.mp3" type="audio/mpeg">
  This browser does not support the audio element.
  <a href="/media/lesson.mp3">Open the audio file</a>
</audio>
<p><a href="/transcripts/lesson.html">Read the transcript</a></p>

The type on a source is information that can help a user agent skip a candidate before fetching it. Declaring a MIME type does not establish that a container, codec, profile, server response, or network condition will allow playback. Also distinguish source selection inside picture from selection inside a media element.

Transparent content inside audio is for user agents that do not support the audio element. A browser that supports audio does not necessarily show that content when fetching or decoding a resource fails. Put a recovery link and transcript outside the element as well.

Attributes and loading boundaries

AttributeRole in the standardBoundary
srcURL of the media resourceWhen present, the child-source candidate model is not used
crossoriginSets the CORS mode for the media requestRead with the resource response headers and credentials conditions
preloadAuthor hint for expected fetching through none, metadata, or autoDoes not require the browser to honor the hint
loadingPolicy for deferring off-viewport media resourcesWhen lazy, loading deferral takes precedence over preload; support and actual timing require implementation evidence
autoplayRequests automatic playbackUser agents are not required to honor it; user preferences and playback policy can affect the result
controlsRequests user-agent playback controlsRendering, operation, and accessibility-tree details can vary by browser and platform
muted / loopInitial muted state / request to return to the start after playback endsDistinguish attributes from current IDL state and actual playback permission
typeMedia type hint on a child sourceNot a content attribute on audio

Media state and playback requests

audio uses the same media processing model as video. The APIs below describe different states; they should not be collapsed into a single “loading percentage.”

API / conceptWhat it observesBoundary
networkStateResource selection and fetchingNETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, and NETWORK_NO_SOURCE
readyStateAvailability of media data at the current positionHAVE_NOTHING through HAVE_ENOUGH_DATA; values need not change in sequence
currentTime / durationPosition and length on the media timelineFinite duration cannot be assumed for unknown or unbounded resources
paused / endedPlayback processing stateDo not infer state only from the appearance of controls
play()Playback request and a Promise for its fulfillment or rejectionIt can reject with NotAllowedError when the user agent does not allow playback
Eventsloadstart, loadedmetadata, canplay, playing, pause, ended, and othersEvents correspond to state changes; an application cannot assume every order or timing

Changing the src or type of a child source after insertion is not a way to switch the current media resource. To explicitly change what is playing, update the media element's src and start resource selection; confirm the relationship with load() against the standard and implementation evidence.

Timed text and accessibility

A child track can specify external timed text associated with the media timeline. An audio playback area has no visual space for captions, so the presence of a track does not by itself provide a readable transcript. Separate the purpose of tracks such as chapters or metadata, the browser UI, and the actual alternatives available to users.

The 2026-09-23 Working Draft of HTML-AAM 1.0 gives audio the computed role html-audio and specifies how native controls are exposed through platform APIs. This is a specification mapping in a Working Draft. It is separate from measurements of a browser Accessibility Tree, platform API, or assistive-technology output.

WCAG 2.2 SC 1.2.1 requires an equivalent time-based media alternative for prerecorded audio-only media that falls within its scope, except when it is clearly labeled as a media alternative for text. This does not mean that the presence of an audio tag alone determines conformance. Distinguish this from caption criteria for prerecorded synchronized media and their own applicability conditions.

DOM Interface

Interface / propertyRoleBoundary
HTMLAudioElementRepresents an audio element and inherits from HTMLMediaElementMany resource-selection and playback APIs are defined on the parent interface
Audio([src])Legacy factory function that creates an audio elementWith a source, resource selection starts and preload is set to auto; this does not mean autoplay is allowed
volume / mutedRead or set playback volume and muted stateConfirm browser, platform, and user-preference constraints through implementation evidence
audioTracksAccess information about audio tracks in the resourceDo not assume multiple tracks or switching are available in every browser

Fact / Evidence

Claims from the HTML Standard, HTML-AAM, and WCAG are paired with their scope and source. The HTML-AAM entry is labeled as a Working Draft; specification mappings and implementation observations remain separate.

TypeFact / claimConditions / scopeStatusSource
SPECaudio is flow, phrasing, and embedded content; with controls, it is also interactive and palpable content.Use where embedded content is expected. The DOM interface is HTMLAudioElement.ReviewedHTML Standard: the audio element
SPECThe presence of src changes the order of source, track, and transparent content.With src, the content model excludes child source elements; both models exclude descendant media elements.ReviewedHTML Standard: audio content model
SPECpreload is a hint about expected fetching; loading deferral takes precedence when loading="lazy".Actual fetching, viewport conditions, autoplay, and browser support are separate implementation questions.ReviewedHTML Standard: media loading attributes
SPECResource selection, network / ready states, playback promises, and event processing are defined by the shared media model.Keep play() rejection distinct from browser autoplay policy and resource decode errors.ReviewedHTML Standard: media elements
AAMThe HTML-AAM 1.0 Working Draft gives audio the computed role html-audio and defines platform role and native-control mappings.Working Draft dated 2026-09-23. This is distinct from browser-tree, platform-API, and assistive-technology measurements.Draft reviewedHTML-AAM: audio
SPECWCAG 2.2 SC 1.2.1 requires an equivalent time-based media alternative for in-scope prerecorded audio-only media.Exception: clearly labeled media alternatives for text. Conformance is not determined by the HTML element alone.ReviewedWCAG 2.2 SC 1.2.1

Evidence

  1. HTML Standard: The audio element — categories, content model, attributes, and HTMLAudioElement
  2. HTML Standard: Media elements — resource selection, state, playback, events, loading, and multiple tracks
  3. HTML Accessibility API Mappings 1.0: audio — computed role and platform mappings; Working Draft
  4. WCAG 2.2 SC 1.2.1 — prerecorded audio-only and video-only alternatives
  5. Web Platform Tests: the-audio-element and media-elements — test discovery entry points. Results for nine selected files appear in Implementation Evidence and are separate from full-directory coverage.

Implementation Evidence

Normative claims are tracked separately from browser, WPT, and Accessibility Tree observations. IMPL, WPT, and AAM have partial measurements from selected scope in Chrome 154 / Windows 11 Pro build 26200.

audio element implementation evidence registry
TypeObservation scopeConditions to recordStatus
IMPL MIME candidate selection for child source, networkState / readyState, metadata / data / canplay events, duration / currentTime, activation-triggered play() Promise / playing / pause, loading IDL support, and native controls 2026-09-26 / Chrome UA 154.0.0.0 / Windows 11 Pro build 26200. The local audio-v1 mono PCM16 WAV (44.1 kHz, 3 s) skipped an unsupported MIME candidate and selected sample.wav from an HTTP 206 audio/wav Range response. Observed loadedmetadata → loadeddata → canplay, duration 3 s, networkState=1, readyState=4. At button click user activation was true; play() resolved and playing fired with volume=0 / muted=false; after about 500 ms currentTime=0.286 s and playback was active. With only an unsupported source, networkState=3, currentSrc empty, and error=null. Partial observation (Chrome 154 / one environment)
WPT Selected WPTs for the the-audio-element constructor and loading behavior, plus shared media-elements initial states, src reflection, and metadata / canplay events 2026-09-26 / Chrome UA 154.0.0.0 / Windows 11 Pro build 26200 / wpt.live. All 28/28 assertions passed across four audio-specific and five shared-media files: audio-loading-eager.html (1/1), audio_constructor.html (11/11), audio-loading-lazy-in-viewport.html (1/1), audio-loading-load-preload-metadata-deferred.html (1/1), networkState_initial.html (2/2), readyState_initial.html (2/2), src_reflects_attribute_not_source_elements.html (2/2), event_loadedmetadata_noautoplay.html (4/4), event_canplay_noautoplay.html (4/4). The GitHub WPT master listing has 20 and 71 direct HTML tests in those directories, respectively. Nested tests, remaining files, and other browsers were not run.

The test version used was not recorded. The linked test may change, so this result cannot be repeated with certainty against the same version.

Partial run (28/28 pass)
AAM Chrome Accessibility Tree snapshot of an aria-labeled audio container description and native play button, seek slider, and additional media controls; the HTML-AAM computed role is kept as a specification mapping 2026-09-26 / Chrome UA 154.0.0.0 / Windows 11 Pro build 26200. The snapshot showed Description “Atlas audio-v1 test tone”, button “再生”, slider “オーディオ再生バー”, and other controls. The HTML-AAM 1.0 Working Draft (2026-09-23) html-audio role mapping was reviewed separately. Windows platform APIs and assistive technology were not observed. Partial observation (Chrome AX tree)

IMPL uses a local PCM WAV fixture, WPT covers the nine files linked in the table with 28/28 assertions passing, and AAM records a Chrome Accessibility Tree snapshot. Full WPT coverage, other browsers, Windows platform APIs, and assistive technology remain unverified.

Coverage / Open Issues

  • Specification reviewedMeaning, categories, context, content models with and without src, shared media attributes, and DOM interface
  • Specification reviewedSource-selection, network / ready states, playback promises, and event-model entry points
  • Specification reviewedHTML-AAM Working Draft and applicability of WCAG 2.2 SC 1.2.1
  • Partial observationA Chrome 154 fixture confirmed source selection, media states and events, user-activated playback, and timeline. Other browsers, codecs, and error types remain open.
  • Partial observationNine selected wpt.live files passed 28/28 assertions. The remaining files and nested tests in both directories were not run.
  • Partial / openNative controls were observed in Chrome's Accessibility Tree. Windows platform APIs, assistive technology, transcript announcements, CORS, multiple audio tracks, and other browsers were not tested.

These partial observations are limited to Chrome 154 / Windows 11 Pro build 26200. They do not claim playback verification across browsers or codecs, complete WPT coverage, platform accessibility API or assistive-technology behavior, or that all audio content meets accessibility requirements.

Related surface

For a beginner-friendly guide to audio examples, playback controls, source candidates, and transcripts, see audio in Yugien. Parent-specific source attributes and candidate selection are covered by the source element. For the shared media state and playback model plus a visual playback area, see the video element; see the track element for timed-text kinds, attributes, and WebVTT, and picture for image-resource selection.