This rule raises an issue when <audio> or <video> elements have the autoplay attribute.
Media content that plays automatically can create significant barriers for users with disabilities and negatively impact the user experience.
When audio or video starts playing without user interaction, it can:
Autoplay also conflicts with the principle that users should control their browsing experience. Many browsers now block autoplay by default, but relying on browser behavior rather than following accessibility guidelines is not a reliable approach.
Users with disabilities may be unable to use the website effectively. Screen reader users may lose their place in the content, and users with cognitive or attention disorders may become disoriented. This creates legal compliance risks under accessibility regulations like the Americans with Disabilities Act (ADA) and similar laws worldwide.
Remove the autoplay attribute and provide visible controls for users to start playback manually. Include the controls
attribute to ensure users can control playback.
<video autoplay src="welcome.mp4"></video> <!-- Noncompliant --> <audio autoplay controls> <source src="background.mp3" type="audio/mpeg"> <!-- Noncompliant --> </audio>
<video controls src="welcome.mp4"></video> <audio controls> <source src="background.mp3" type="audio/mpeg"> </audio>