Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Multimedia web accessibility refers to ensuring that multimedia content, such as videos, audio files, and interactive presentations, is accessible to all individuals, including those with disabilities. Multimedia content is prevalent on the internet, and everyone must access and understand the information conveyed. Accessible media must meet all the needs of people with disabilities and must include:
The accessible multimedia is customized for assistive technologies. This means that blind people no longer have to rely on others to read to them. They simply open the browser and interact with the content on their own, as screen reader software is designed to read online content out loud.
Without a caption for an audio file, deaf people cannot recognize the meaningful information that the audio conveys. But captions, if they are well-written and synchronized with the audio content, provide descriptions of critical visual details and actions in multimedia.
We already covered how to check alt text for images, buttons, and more in the
Screen Reader Accessibility article. Here, we will look at the importance of using a <track> element for multimedia accessibility.
<track> Element to Provide Audio & Video DescriptionsVideo content cannot be seen by visually impaired people, and audio content cannot be heard by hearing-impaired people. The primary purpose of the <track> element is to provide captions and subtitles for video and audio content. While it’s not intended for providing audio descriptions directly, it can be used in conjunction with other methods to make audio descriptions available for individuals with visual impairments.
The use of the video alt text is not a standard or recommended practice in HTML. The alt attribute is primarily used for providing alternative text for images and is not intended for <video> elements. However, there are alternative approaches to making video content accessible.
Captions in the video include a textual description of all essential background noises and other sounds and the text of all dialogue and narration. The <video> element must include a <track> element with kind="captions" property. Captions must convey all relevant auditory information in the video, including dialogue, musical cues, sound effects, and other vital data for deaf users.
Here’s how you can use the <track> element for multimedis accessibility:
1<video poster="myvideo.png" controls>
2 <source src="myvideo.mp4" srclang="en" type="video/mp4">
3 <source src="myvideo.webm" srclang="fr" type="video/webm">
4 <source src="myvideo.webm" srclang="ua" type="video/webm">
5 <track src="myvideo_en.vtt" kind="captions" srclang="en" label="English">
6 <track src="myvideo_fr.ttml" kind="captions" srclang="fr" label="French">
7 <track src="mvideo_ua.vtt" kind="captions" srclang="ua" label="Ukrainian">
8</video>Let’s look at line 5 of the HTML code. The src attribute of the <track> element specifies the track file name and points to the WebVTT file (“myvideo_en.vtt”) containing the captions or subtitles. The kind attribute describes the contents of the file. The srclang attribute specifies the language of the track file. The label attribute specifies the track name. None of these attributes, except src, are required. However, they are highly recommended as they improve clarity.
Ensure all elements with audio content on the website have a caption using the <track> element with kind="captions" property. Captions are text—synchronized with the audio file—of the dialog, narration, and any important auditory information, for the benefit of deaf users. The following code shows how to add two different tracks – one in English and one in Spanish:
1<audio>
2 <source src="mySpeech.mp3" type="audio/mp3">
3 <track src="captions_en.vtt" kind="captions" srclang="en" label="english_captions">
4 <track src="captions_es.vtt" kind="captions" srclang="es" label="spanish_captions">
5</audio><video> elementsAdding audio descriptions to <video> elements is a crucial accessibility practice, ensuring that individuals with visual impairments can fully understand and enjoy video content. While blind people can hear the audio content of videos with no issue, they miss the visual aspects of films, such as facial expressions and scenes. Many things happen in movies that are completely visual, with no auditory component. For example, a person can make a facial expression but not speak. Audio descriptions provide narrated information about the visual elements of a video, such as scenes, actions, and gestures.
The following code shows how to add two different audio descriptions – one in English and one in Spanish:
1<video width="300" height="200">
2 <source src="myVideo.mp4" type="video/mp4">
3 <track src="audio_desc_en.vtt" kind="descriptions" srclang="en" label="english_description">
4 <track src="audio_desc_es.vtt" kind="descriptions" srclang="es" label="spanish_description">
5</video>To check your website for the multimedia accessibility criteria, you need to follow these steps:
webAccessibility object that provides access to a collection of web accessibility rules.document) method to check the HTML document for accessibility. The result is stored in the validationResult variable.In this example, you can check an HTML document for compliance with all the criteria in the “1.2 Time-based Media” guideline.
1// Validate HTML for multimedia accessibility using C#
2
3// Initialize a webAccessibility container
4WebAccessibility webAccessibility = new WebAccessibility();
5
6// Get from the rules list Principle "1.Perceivable" by code "1" and get guideline "1.2 Time-based Media"
7Guideline guideline = webAccessibility.Rules.GetPrinciple("1").GetGuideline("1.2");
8
9//Create an accessibility validator, pass the found guideline as parameters, and specify the full validation settings
10AccessibilityValidator validator = webAccessibility.CreateValidator(guideline, ValidationBuilder.All);
11
12// Initialize an HTMLDocument object
13using (HTMLDocument document = new HTMLDocument("https://www.youtube.com/watch?v=Yugq1KyZCI0&t=4s"))
14{
15 // Check the document
16 ValidationResult validationResult = validator.Validate(document);
17
18 // Checking for success
19 if (!validationResult.Success)
20 {
21 // Get all result details
22 foreach (RuleValidationResult ruleResult in validationResult.Details)
23 {
24 // If the result of the rule is unsuccessful
25 if (!ruleResult.Success)
26 {
27
28 // Get an errors list
29 foreach (ITechniqueResult result in ruleResult.Errors)
30 {
31 // Check the type of the erroneous element
32 if (result.Error.Target.TargetType == TargetTypes.HTMLElement)
33 {
34 HTMLElement rule = (HTMLElement)result.Error.Target.Item;
35 Console.WriteLine("Error in rule {0} : {1}", result.Rule.Code, result.Error.ErrorMessage);
36 Console.WriteLine("HTML Element: {0}", rule.OuterHTML);
37 }
38 }
39 }
40 }
41 }
42}To check, for example, the presence of audio description, you must select the desired criterion and make a check on it.
1 // Get from the rules list Principle "1.Perceivable" by code "1" and get guideline "1.2 Time-based Media"
2 var guideline = webAccessibility.Rules.GetPrinciple("1").GetGuideline("1.2");
3
4 // Get criterion – 1.2.3 Audio Description or Media Alternative (Prerecorded)
5 var criterion = guideline.GetCriterion("1.2.3");
6
7 // Create an accessibility validator – and pass the found guideline as parameters and specify the full validation settings
8 var validator = webAccessibility.CreateValidator(criterion, ValidationBuilder.All);
9
10 ...Remember that the key is to ensure that users with disabilities can access the multimedia content and understand its context effectively. Combining multiple accessibility techniques, such as captions, transcripts, and audio descriptions, can provide all users with a comprehensive and inclusive experience.
Aspose.HTML offers free online Web Accessibility Checker. This tool scans web pages, validates them for WCAG compliance, identifies problems, and suggests improvements. Get instant insights into your website’s compliance, allowing you to determine the scope of necessary corrections and the gap between the current state of your website or HTML document and WCAG requirements.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.