VBC-024: autoplay-video-unmuted
errorCategory: ux-dx
Analysis: Regex (whole file)
File types: .html, .js, .ts, .tsx, .jsx, .astro
Scope: source code only, ignoring anything inside strings and comments
Tags: ux accessibility
What it reports
Autoplay video without the muted attribute at line {line}. Autoplaying audio is one of the most hostile UX patterns: it embarrasses users in quiet environments, eats mobile data, and is blocked by most browsers anyway. Add muted or remove autoplay.
Flagged
html
<video autoplay src="clip.mp4"></video>Not flagged
html
<video autoplay muted src="clip.mp4"></video>html
<video controls></video>Pattern
regex
<video[^>]*\bautoplay(?![^>]*\bmuted\b)[^>]*>