All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.web.rules.Web.S4084.html Maven / Gradle / Ivy

The newest version!

Why is this an issue?

In order to make your site usable by as many people as possible, subtitles should be provided for videos.

This rule raises an issue when a video does not include at least one <track/> tag with the kind attribute set to captions, or descriptions or at the very least subtitles.

Note that the subtitles kind is not meant for accessibility but for translation. The kind captions targets people with hearing impairment, whereas descriptions targets people with vision impairment.

Noncompliant code example

<video id="video" controls preload="metadata">
   <source src="resources/myvideo.mp4" type="video/mp4">
   <source src="resources/myvideo.webm" type="video/webm">
</video>

Compliant solution

<video id="video" controls preload="metadata">
   <source src="resources/myvideo.mp4" type="video/mp4">
   <source src="resources/myvideo.webm" type="video/webm">
   <track label="English" kind="captions" srclang="en" src="resources/myvideo-en.vtt" default>
   <track label="Deutsch" kind="captions" srclang="de" src="resources/myvideo-de.vtt">
   <track label="Español" kind="captions" srclang="es" src="resources/myvideo-es.vtt">
</video>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy