Skip to content

mediaCaptions

Reports media elements without captions.

✅ This rule is included in the jsx logical preset.

Providing captions for media is essential for deaf users to follow along. Captions should be a transcription or translation of the dialogue, sound effects, and other relevant audio information.

Media elements (<audio> and <video>) should include a <track> element with kind="captions" to provide this accessibility feature. The only exception is that muted media does not require captions.

This is required for WCAG 1.2.2 and 1.2.3 compliance.

<audio src="audio.mp3" />
<video src="video.mp4" />
<video>
<track kind="subtitles" />
</video>

If you’re not using media elements or have a different captioning system, you can disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.