- Success Criterion 1.4.2
- Conformance level A
Background Music That Autostarts With No Visible Player
1.4.2 — Audio Control
Scenario
Setting
A grocery delivery app's shopping cart
What’s wrong
Background music autostarting on load with controls hidden (controls removed, custom player provides none).
Example
<audio id="cart-music" src="checkout-loop.mp3" autoplay></audio>
<!-- a script strips the controls attribute right after load: document.getElementById("cart-music").removeAttribute("controls"); --> Why it matters
A shopper reviewing their cart at work is embarrassed when music suddenly plays and there's no visible way to stop it.
How to test
Load the page: if background music starts playing automatically and there's no visible player/mute control at all, it fails.
How to fix
Never strip the native controls attribute; if you build a custom player, replicate a visible mute and stop button.
<audio id="cart-music" src="checkout-loop.mp3" controls></audio> Outcome
The shopper mutes the background music in one tap and finishes checking out without distraction.
Who is affected
Screen reader users who lose track of cart total announcements over the music, and anyone in a sound-sensitive environment.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- Page Audio That Autoplays Past 3 Seconds With No Control
- Autoplaying Video or Audio With No Way to Pause It
- Autoplaying Hero Video With Sound and No Pause Button
- Embedded Ad or Carousel iframe That Starts Playing Audio
- Audio That Starts on a Single-Page-App Route Change
- Looping Notification Sound With No Way to Turn It Off