Accessibility Weekly

Writing Good Alt Text

Published:

amber-200

Amber Hinds

Equalize Digital

Amber Hinds is the CEO of Equalize Digital, Inc., a Certified B Corp specializing in WordPress accessibility, maker of the Accessibility Checker plugin, and lead organizer of the WordPress Accessibility Meetup and WP Accessibility Day conference.

Week 6

We all know that adding alternative text to images is good for SEO because it helps Google know what those images are about. But alt text is about more than search engine optimization. Alt text on images is how people who are blind or visually impaired know what an image is conveying.

Note I did not write that alternative text is about describing how an image looks. This is one of the most common misconceptions about alt text.

In many instances, alt text does, indeed, describe how an image looks or what an image is, but in other cases, it is not helpful to have alt that visually describes the image.

Good alt text does not describe the image itself, but rather describes the image’s purpose on the page.

Examples of Good Alt Text

Good alt text should be accurate and succinct. Think tweet length or less. It’s important to remember the goal of alt text is to provide equivalent information to users who cannot see images, so you want to convey key details that a sighted person would receive from seeing the image.

Image Added to A Page

Imagine a photo of a dog playing fetch, used to illustrate a web page about a dog park. The purpose of the image is to make the park look enticing to potential visitors, showing happy dogs enjoying the park, and may also convey information about amenities available if someone visits the park.

Example alt text:

alt="A happy labrador retriever playing fetch in [dog park name]; in the background, are multiple shade trees, a water spigot, and short fencing."

Charts and Graphs

Complex charts and graphs can be hard to provide all of the information in alternative text. In that instance, you want to provide an alternative means of accessing the data (such as a table) near the image, and can use the alt text to communicate to the user where they might find the information.

For example, on a chart showing the follower growth of a company over the past year, you might write:

alt="A bar chart showing a 20% increase in followers from January to December of 2022. See table following image for all data points."

Headshots

When you have a collection of headshots, such as on a team page, the purpose of the images is to provide personality and make that group of people feel more “real” to the website visitor.

Don’t just write “Amber Hinds’ headshot.” Instead, you want to convey the same information that a sighted person might have. Include a description of age, race, gender, physical appearance, clothing, or other unique elements in the headshot.

This allows blind and visually impaired people access to the same information about diversity and personalities that a sighted person has.

Linked Images

This is one of the top mistakes we see on websites – describing what a linked image (such as a logo or an icon) looks like, rather than where it goes.

Images that are linked need alt text that succinctly describes where the link points because the alt text on the image will get read out as the text of the link by a screen reader.

For example, if you have a logo that is linked to your home page, the correct alt text would not be “Equalize Digital Logo” – rather, it would be:

alt=”Equalize Digital home page”

When Not to Use Alt Text

Sometimes the correct alt text is to have no alt text at all. If you have an image that is purely decorative and provides zero informational value to the user (such as a border or decorative accent), then it is correct for that image to have an empty alt attribute, like this:

<img src=”/border.png” alt=””>

Having an alt attribute that is empty will tell screen readers to ignore the image altogether. This helps users quickly get to the information they need without being distracted by clutter.

Many people ask – how do you decide if an image is “decorative”? Generally it’s safe to assume that an image is never decorative (there’s a reason why you have a person working on a laptop with that blog post and not a photo of toast on a plate, after all). If you need help deciding, W3 has an alt text decision tree that may be helpful.

More Alt Text Resources

If you want to learn more about writing good alt text, here are some additional resources:

Join the Conversation!

There's a dedicated thread on this post inside of The Admin Bar community. Join in on the conversation, ask questions, and learn more!

Group Thread
amber-200

Amber Hinds

Equalize Digital

Amber Hinds is the CEO of Equalize Digital, Inc., a Certified B Corp specializing in WordPress accessibility, maker of the Accessibility Checker plugin, and lead organizer of the WordPress Accessibility Meetup and WP Accessibility Day conference.

Through her work at Equalize Digital, Amber is striving to create a world where all people have equal access to information and tools on the internet, regardless of ability. Since 2010, she has led teams building websites and web applications for nonprofits, K-12 and higher education institutions, government agencies, and businesses of all sizes. Through this journey, she learned about the importance of making websites accessible to everyone, and it has been her passion to bring awareness to accessibility and make website accessibility easier, ever since. 

Brought to you by:

Make your WordPress website accessible and ensure all people have equal access to your products or services, regardless of ability. Reach more customers, reduce liability, and increase conversions.

Come Join Us!

Join the #1 WordPress Community and dive into conversations covering every aspect of running an agency!

Kyle Van Deusen

Community Manager

More from Accessibility Weekly

Week 51

How Accessible is “Accessible Enough”

In an ideal world where clients have unlimited budgets and everything is custom, every website would …

Week 50

How to Sell Accessibility in New Builds

Creating websites that prioritize accessibility is no longer just a best practice—it’s a business must, especially …

Week 49

Accessibility in Web Development Contracts

Whether you’re running an agency or freelancing, having a clear contract for your web development and …