Alternative Text for Images, Complex Images and Infographics, Accessible Audio and Video Content #
Images/icons/graphic elements #
Having accessible images on a website is crucial as it ensures that all users can understand and engage with the content effectively.
Accessible images follow these essential practices.
- Every image has alternative text that provides meaningful information, describing the image’s content and purpose in the context of the page.
- Alt text does not repeat information already provided in nearby text or through other page elements.
- Images that are purely decorative or don’t add meaning to the content (e.g., background images) have empty or null alt attributes (`alt=””`) to ensure they are skipped by screen readers.
- Alt text does not include file names, “image of” descriptions, or irrelevant details such as “photo of,” unless itβs necessary to describe the content.
- All images across the site consistently follow the same principles for alt text.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Accessible Images Example</title>
</head>
<body>
<h1>Accessible Images Example</h1>
<!-- Informative Image with Descriptive Alt Text -->
<img src="team-photo.jpg" alt="Team of five people smiling during a meeting in the office" width="600" height="400">
<p>
This image shows our team during a brainstorming session at the office. Everyone is fully engaged, working together to come up with innovative ideas.
</p>
<!-- Decorative Image with Empty Alt Attribute -->
<img src="decorative-line.png" alt="" aria-hidden="true" width="600" height="20">
<p>
We are dedicated to providing high-quality services to all our clients, and teamwork is at the heart of our company culture.
</p>
<!-- Product Image with Contextual Alt Text -->
<img src="laptop-product.jpg" alt="A sleek silver laptop on a desk with its screen showing a code editor" width="600" height="400">
<p>
The image above shows one of our top-selling laptops, perfect for professionals who need a powerful machine for coding and design.
</p>
<!-- Logo Image (Meaningful) -->
<img src="company-logo.png" alt="Company Name Logo" width="200" height="50">
<!-- Background Image Example (Decorative, controlled via CSS) -->
<div style="width: 100%; height: 300px; background-image: url('office-background.jpg');">
<!-- This background image is purely decorative and should not have alt text -->
</div>
</body>
</html>
Screen reader: NVDA
Video:
Guidelines for writing effective alt text, Decorative images and empty alt attributes #
Alternative text (alt text) plays a critical role in web accessibility, ensuring users with visual impairments can understand and interact with image content using screen readers. A well-thought-out alt text strategy improves usability, SEO, and overall user experience.
Guidelines for Writing Effective Alt Text #
Why Alt Text Matters #
- Enhances accessibility by allowing screen reader users to understand images.
- Improves SEO by helping search engines understand image content.
- Provides fallback content when images fail to load.
Best Practices for Writing Alt Text #
β
Be Concise but Descriptive: Keep alt text under 125 characters, focusing on essential details.
β
Avoid Redundant Words: Do not include “Image of” or “Picture of” as screen readers already announce it as an image.
β
Describe the Purpose: If an image conveys meaning, describe it in context.
β
Use Keywords Naturally: Optimize for SEO without keyword stuffing.
β
Ensure the Alt Text Matches the Image Context: Describe what is relevant in the page’s context.
Examples of Good vs. Bad Alt Text #
| Image | β Bad Alt Text (Ineffective) | β Good Alt Text (Effective) |
|---|---|---|
| π‘ House | "House" | "Modern two-story red brick house with a garden and white fence" |
| π Graph | "Graph of sales" | "Bar graph showing 20% sales growth from Q1 to Q4" |
| π± Mobile App | "Mobile banking app" | "Screenshot of a banking app showing account balance and recent transactions" |
| π Shopping Cart Icon | "Shopping Cart" | "Shopping cart with three items and a checkout button" |
β Why These Examples Work:
- They describe the image meaningfully.
- They are concise but informative.
- They avoid unnecessary words.
Decorative Images & Empty Alt Attributes (alt="") #
What are Decorative Images? #
Decorative images do not convey essential information and should be ignored by screen readers.
When to Use Empty Alt Attributes (alt="") #
- If an image is purely decorative (e.g., borders, background patterns).
- If text next to the image already explains it.
- If an image is repetitive (e.g., a logo in a footer).
β Correct Implementation (Decorative Image)
<img src="border-design.jpg" alt="">
β Incorrect Implementation (Unnecessary Alt Text)
<img src="border-design.jpg" alt="Fancy decorative border pattern">
β Why This Works:
- Screen readers ignore the image, reducing clutter in the experience.
- Prevents redundant descriptions.
Functional Images (Buttons, Links, and Icons) #
Some images have interactive functions, such as icons in buttons, links, and navigation.
Best Practices for Functional Images #
β
Describe the Action Instead of the Image β "Magnifying Glass Icon"
β
"Search the website"
β
If the Image is a Link, Describe the Destination β "Click Here"
β
"View Home Loan Offers"
β For Buttons, Use ARIA Labels Instead of Alt Text
<button aria-label="Download retail Report">
<img src="download-icon.png" alt="">
</button>
Why? The aria-label provides context, while empty alt text prevents redundancy.
Writing Alt Text for Banners & Popular Images on Websites #
A. Banner Images #
Banners often contain promotional messages or key CTAs.
Use clear and concise copy that communicates your value proposition and benefits. Choose fonts, colors, and images that are consistent with your brand identity and contrast well with the background. Use white space to create balance and hierarchy.
β If the Banner Contains Text, Write it in Alt Text
<img src="banner-sale.jpg" alt="Limited-time sale: Get 50% off on all electronics. Offer valid till March 31st.">
β
If the Banner is Decorative, Use alt="" #
<img src="banner-pattern.jpg" alt="">
Decorative images donβt add information to the content of a page. For example, the information provided by the image might already be given using adjacent text, or the image might be included to make the website more visually attractive.
In these cases, a null (empty) alt text should be provided (alt="") so that they can be ignored by assistive technologies, such as screen readers. Text values for these types of images would add audible clutter to screen reader output or could distract users if the topic is different from that in adjacent text. Leaving out the alt attribute is also not an option because when it is not provided, some screen readers will announce the file name of the image instead.
Whether to treat an image as decorative or informative is a judgment that only the author can make, based on the reason for including the image on the page. Images may be decorative when they are:
- Visual styling such as borders, spacers, and corners;
- Supplementary to link text to improve its appearance or increase the clickable area;
- Illustrative of adjacent text but not contributing information (βeye-candyβ);
- Identified and described by surrounding text.
β Incorrect Implementation (Not Descriptive)
<img src="banner-sale.jpg" alt="Sale banner">
B. Logo Images #
- If the logo is clickable, describe the destination.
<a href="home.html">
<img src="bank-logo.png" alt="XYZ Bank - Home">
</a>
If the logo is decorative (e.g., footer), use empty alt text.
<img src="bank-logo.png" alt="">
C. Product Images #
- Include the product name, color, and key features.
<img src="nike-shoes.jpg" alt="Nike Air Max running shoes in black with red soles">
β Bad Alt Text
<img src="nike-shoes.jpg" alt="Shoes">
D. Infographics & Charts #
For complex images, provide both a short alt text and a longer description.
β Example 1: Simple Chart
<img src="sales-chart.png" alt="Sales increased 20% in Q4">
<p>Quarterly sales rose by 20%, with the highest revenue in December.</p>
β
Example 2: Using aria-describedby for Complex Data
<img src="sales-chart.png" alt="Sales performance by quarter" aria-describedby="sales-data"><br><div id="sales-data"><br> <p>Quarterly sales increased by 15% in Q3 and remained stable in Q4. December had the highest revenue.</p><br></div><br>
Alt Text for Social Media & User-Generated Content #
β Best Practices:
- Describe key elements:
"Group of five friends at a beach sunset, smiling." - For memes, describe the text in the image.
- Avoid personal opinions: β
"A beautiful picture of a sunset."
β Example:
- Post: “Our team celebrating our latest milestone!”
- Alt Text:
"Seven team members in an office, smiling and holding a '500K Users' banner."
Common Mistakes to Avoid #
β Using File Names or Placeholder Text
<img src="image123.jpg" alt="image123">
β Fix
<img src="city-skyline.jpg" alt="New York City skyline at sunset">
β Stuffing Keywords for SEO
<img src="car.jpg" alt="Best affordable new cars for sale 2023">
β Fix
<img src="car.jpg" alt="Red Tesla Model 3 parked outside a showroom">>
Checklist for Writing Alt Text #
β
Is the alt text necessary? (Use alt="" for decorative images)
β
Does it describe the image in context?
β
Is it under 125 characters?
β
Does it avoid redundant words like “image of”?
β
Does it provide meaningful descriptions for interactive images?
β
Is it useful for screen readers and SEO?
Writing effective alt text is essential for web accessibility, usability, and SEO. By following best practices for descriptive alt text, decorative images, and functional icons, you create a more inclusive and user-friendly digital experience.
Quick Summary #
β Use meaningful alt text for important images.
β Use empty alt attributes (alt="") for decorative images.
β Describe function, not appearance, for interactive icons.
β Provide long descriptions for complex images.
β Write user-friendly, keyword-optimized alt text.
Complex Images and Infographics – Long descriptions (longdesc attribute), Using <figure> and <figcaption> #
Complex images, such as infographics, charts, diagrams, maps, and illustrations, require detailed descriptions for users with visual impairments. Simple alt text is not enough to convey all the necessary information. This guide explains how to provide long descriptions using the <longdesc> attribute, the <figure> and <figcaption> elements, and alternative methods for enhancing accessibility.
Why Long Descriptions are Needed for Complex Images #
Simple images (icons, logos, buttons) can be described using short alt text (under 125 characters), but complex images require more details.
Types of Complex Images That Need Long Descriptions #
β
Infographics (e.g., “The impact of climate change”)
β
Statistical Charts (e.g., Bar graphs, pie charts)
β
Maps (e.g., A subway system map)
β
Diagrams (e.g., A technical architecture model)
β
Process Flows (e.g., Steps in an application process)
Example: #
β Bad Alt Text: "Bar graph of sales data." (Too vague)
β
Good Alt Text (With Long Description Link): "Bar graph comparing sales performance for Q1-Q4. Click for a full description."
Using <longdesc> for Long Descriptions #
The longdesc attribute provides a way to link an image to a separate detailed description page or section.
β
When to Use <longdesc> #
- When a short alt text is insufficient.
- When the image contains a lot of text or data.
- When a detailed explanation is necessary.
Example (Using <longdesc> Attribute)
<img src="sales-graph.png" alt="Sales performance graph for 2023." longdesc="sales-data.html">
The longdesc attribute links to sales-data.html, which contains a detailed explanation.
Using <figure> and <figcaption> for Descriptive Images #
The <figure> and <figcaption> elements provide a built-in way to include descriptive text alongside an image.
β
When to Use <figure> and <figcaption> #
- When the description is brief but longer than alt text.
- When keeping the description on the same page improves usability.
- When users benefit from visual + textual information together.
Example (Using <figure> with <figcaption>) #
<figure>
<img src="climate-impact.png" alt="Infographic on climate change impact">
<figcaption>
The infographic shows how global temperatures have increased by 1.2Β°C in the last 50 years, leading to higher sea levels and extreme weather conditions.
</figcaption>
</figure>
Why This Works:
- The figcaption provides a concise summary.
- The alt text still gives an overview.
- Screen readers announce
<figcaption>text automatically.
Providing a Separate Text Alternative #
Some complex images require a fully detailed text version in the page content itself.
β When to Use a Separate Text Alternative #
- When users need a deep analysis of the data.
- When the infographic contains multiple sections and statistics.
- When accessibility tools cannot extract text from the image.
Example: Infographic with a Text Alternative #
<img src="climate-change-impact.png" alt="Infographic about the impact of climate change." aria-describedby="climate-impact-text">
<div id="climate-impact-text">
<h2>Impact of Climate Change</h2>
<p>The infographic explains that global temperatures have increased by 1.2Β°C in the past 50 years.</p>
<p>Key statistics:</p>
<ul>
<li>Sea levels have risen by 3.3 mm per year.</li>
<li>Extreme weather events have increased by 50% since 1980.</li>
<li>CO2 levels are now over 415 ppm, the highest in recorded history.</li>
</ul>
</div>
Why This Works:
- The alt text introduces the infographic.
- The detailed text alternative (
id="climate-impact-text") gives full details. - Screen readers read the description when navigating the image.
Providing Text Alternatives for Charts & Graphs #
For financial, or technical sites, users need full access to data from charts and graphs.
Example (Accessible Bar Graph with Table Alternative) #
<figure>
<img src="sales-bar-chart.png" alt="Bar chart showing quarterly sales growth in 2023" aria-describedby="sales-table">
<figcaption>
Sales growth per quarter in 2023, with Q3 showing the highest increase.
</figcaption>
</figure>
<table id="sales-table">
<caption>Quarterly Sales Data for 2023</caption>
<thead>
<tr>
<th>Quarter</th>
<th>Sales (in USD)</th>
<th>Growth %</th>
</tr>
</thead>
<tbody>
<tr>
<td>Q1</td>
<td>$500,000</td>
<td>+5%</td>
</tr>
<tr>
<td>Q2</td>
<td>$600,000</td>
<td>+10%</td>
</tr>
<tr>
<td>Q3</td>
<td>$750,000</td>
<td>+15%</td>
</tr>
<tr>
<td>Q4</td>
<td>$720,000</td>
<td>-4%</td>
</tr>
</tbody>
</table>
Why This Works:
- Users can read the data in a table format if they cannot see the graph.
- Screen readers provide structured navigation through the table.
Summary of Best Practices #
Quick Decision Guide #
| Scenario | Use |
|---|---|
| Simple images | alt="short description" |
| Decorative images | alt="" |
| Complex charts | <longdesc> or <figcaption> with a table alternative |
| Infographics | aria-describedby with a text alternative |
| Interactive images | Use ARIA roles (aria-label, aria-describedby) |
Providing long descriptions for complex images ensures that all users, including visually impaired individuals, can access the same information as sighted users. By combining <longdesc>, <figure>, <figcaption>, and structured text alternatives, you create an inclusive and accessible digital experience.
πΉ Follow best practices to ensure that charts, infographics, and data visualizations are usable by everyone! βΏ
Accessible Audio and Video Content – Providing captions and transcripts, Audio descriptions for videos #
Providing accessible audio and video content ensures that people with hearing and visual impairments can fully engage with media. Captions, transcripts, and audio descriptions make content inclusive, benefiting not only users with disabilities but also non-native speakers, people in noisy environments, and SEO optimization.
This guide covers:
- Captions and Subtitles (for users who are Deaf or Hard of Hearing)
- Transcripts (for accessibility and content flexibility)
- Audio Descriptions (for users who are Blind or have low vision)
- Best Practices for Embedding Accessible Media
Captions and Subtitles #
What are Captions? #
Captions are text versions of spoken dialogue synchronized with the video. They also include non-speech elements such as sound effects, speaker identification, and background noises.
β Types of Captions #
- Closed Captions (CC): Viewers can toggle them on or off.
- Open Captions: Always visible and burned into the video.
- Live Captions: Generated in real-time (e.g., YouTube, Zoom, Google Meet).
β Best Practices for Writing Captions #
β Use accurate timing to match the speech.
β Include background sounds (e.g., [door creaks], [music playing]).
β Identify speakers when unclear (e.g., Narrator:, Anna:).
β Keep captions short (β€ 37 characters per line).
β Use proper punctuation and grammar.
Example (Closed Captioning) #
<video controls>
<source src="video.mp4" type="video/mp4">
<track src="captions-en.vtt" kind="captions" srclang="en" label="English Captions">
</video>
Why This Works:
- Adds closed captions via a
.vttfile. - Ensures users can toggle captions on/off.
Transcripts #
What is a Transcript? #
A transcript is a text-based version of an audio or video file, including spoken content, speaker identification, and descriptions of sound effects.
When to Provide a Transcript #
β For all pre-recorded and live audio/video content.
β If captions arenβt available, transcripts provide an alternative.
β For podcasts, interviews, webinars, and presentations.
β Best Practices for Transcripts #
β Identify speakers (e.g., [Anna]: Welcome to the show!).
β Include descriptions of key sounds (e.g., [door creaks], [soft jazz music playing]).
β Ensure transcripts are easy to read and scannable.
β Provide downloadable text files (TXT, DOC, or PDF).
Example (Video with Transcript) #
<video controls>
<source src="business-pitch.mp4" type="video/mp4">
</video>
<h2>Transcript</h2>
<p><strong>John:</strong> Welcome to our business pitch.</p>
<p><strong>Sarah:</strong> Today, we will introduce a revolutionary product.</p>
<p><em>[Soft background music playing]</em></p>
Why This Works:
- Provides a text-based alternative for the video.
- Users can read the transcript if they cannot watch the video.
Audio Descriptions (For Blind or Low Vision Users) #
What is an Audio Description? #
Audio descriptions narrate key visual elements in a video for blind or low-vision users. They describe:
β Facial expressions, actions, scene changes, and text on the screen.
β Essential information that isnβt conveyed through dialogue.
β When to Provide Audio Descriptions #
β When critical visual content isnβt described in dialogue.
β For movies, training videos, marketing ads, and instructional content.
β Best Practices for Audio Descriptions #
β Keep descriptions concise but informative.
β Describe visual details that impact understanding.
β Ensure descriptions do not overlap with dialogue.
Example (Adding Audio Descriptions to a Video) #
<video controls>
<source src="product-launch.mp4" type="video/mp4">
<track src="audio-description.vtt" kind="descriptions" srclang="en" label="English Audio Descriptions">
</video>
Why This Works:
- Users can toggle the audio description track.
- Enhances accessibility for blind users
Best Practices for Embedding Accessible Media #
β
Use HTML <video> with Captions and Audio Descriptions #
<video controls>
<source src="training-video.mp4" type="video/mp4">
<track src="captions-en.vtt" kind="captions" srclang="en" label="English Captions">
<track src="audio-description.vtt" kind="descriptions" srclang="en" label="English Audio Description">
</video>
β Supports both captions and audio descriptions.
β Allows users to toggle accessibility features.
Provide Captions in .VTT Format #
A WebVTT (.vtt) file stores captions in time-synchronized text format.
WEBVTT
00:00:00.000 --> 00:00:02.000
[Music playing] A company logo appears on screen.
00:00:02.500 --> 00:00:05.000
John: Welcome to our new product demo.
00:00:05.500 --> 00:00:08.000
[Text on screen: "Limited Time Offer"]
Why This Works:
- Keeps captions in sync with the video.
- Can be used across multiple platforms (HTML5, YouTube, Vimeo).
Use Third-Party Captioning Services for Accuracy #
- YouTube Auto-Captions (Manually Edit for Accuracy)
- Rev.com (Paid but high accuracy)
- Otter.ai (AI-generated transcripts with manual editing)
- Adobe Premiere Pro / Final Cut Pro (For burned-in captions)
Accessibility Compliance (WCAG, ADA, Section 508) for media content #
Required for Compliance:
- Captions for all pre-recorded and live videos.
- Transcripts for all audio/video content.
- Audio descriptions for videos where needed.
Providing captions, transcripts, and audio descriptions is essential for ensuring accessibility in multimedia content. By implementing these best practices, you create an inclusive experience for users with disabilities, improving engagement, compliance, and SEO rankings.
β Quick Checklist for Accessible Media #
β Captions (For Deaf and Hard-of-Hearing Users)
β Transcripts (For All Users, Including SEO Benefits)
β Audio Descriptions (For Blind or Low-Vision Users)
β HTML <video> with <track> elements
β WebVTT (.vtt) for captions and descriptions
β Testing with Screen Readers & Accessibility Tools
By integrating these practices, you make your audio and video content accessible to everyone! βΏπ₯