Skip to content

no-autoplay

Reports <audio> and <video> with autoplay and without muted.

Sound that starts by itself startles users, drowns out a screen reader, and fails accessibility guidelines. Browsers block it in many cases, so the page also behaves differently from one visit to the next.

To fix, remove autoplay, or add muted.

Reported
...
<input type="text" name="b">
...
<video autoplay></video>
<video controls></video>
</body>
</html>
angular:
lint:
rules:
no-autoplay: warn # off (default), warn, error
html:
lint:
rules:
no-autoplay: warn # off (default), warn, error
svelte:
lint:
rules:
no-autoplay: warn # off (default), warn, error
vue:
lint:
rules:
no-autoplay: warn # off (default), warn, error

Enabled by the presets: html/html-validate-recommended.

Suppress one line with sudsy-disable-next-line no-autoplay in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
html-validate no-autoplay full