Closed jeeyyy closed 4 years ago
Uses the params t
on an audio to specify start play time
<audio src="abc.mp3#t=25" autoplay="true"></audio>
Uses the params t
on a video to specify start and end time
<video autoplay="true">
<source src="video.mp4#t=8,10" type="video/mp4" />
</video>
Duration of the audio is longer than 3 seconds
<audio src="moon-speech.mp3" autoplay="true" controls></audio>
Duration of the video is > 3 seconds
<video autoplay="true">
<source src="video.mp4" type="video/mp4" />
</video>
No controls
<video autoplay="true">
<source src="../test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="../test-assets/rabbit-video/video.webm" type="video/webm" />
</video>
No autoplay
attribute
<audio src="moon-speech.mp3" controls></audio>
Muted
<video autoplay="true" muted="true">
<source src="video.mp4" type="video/mp4" />
</video>
Paused
<video autoplay="true" paused="true">
<source src="video.mp4" type="video/mp4" />
</video>
loop
attribute?preload
rule help infrastructure created 1/27/2020
New rule help created, captured in release notes 2/03/2020
Verified with 'no-autoplay-audio.html' test file, getting 'needs review' issues.
Verified with axe-coconut ,
no-autoplay-audio
This rule checks that
autoplayaudio does not last for more than 3 seconds, or it has a control mechanism
<video> or <audio> elements does not autoplay audio
Tags
Matches
"selector": "audio[autoplay], video[autoplay]"
"excludeHidden": false
, because some user agents hide media elements when controls attribute is missing.paused
ormuted
.Checks
Check 1:
no-autoplay-audio-below-allowed-duration
<video> or <audio> does not output audio for more than allowed duration
<video> or <audio> outputs audio for more than allowed duration
Check that the <video> or <audio> does not output audio for more than allowed duration
Check 2:
no-autoplay-audio-has-controls
<video> or <audio> has controls mechanism
<video> or <audio> does not have controls mechanism
Check that the <video> or <audio> has controls mechanism
ACT Rule Reference: