Should you trust automated tools to write alternative text for images? Here’s a look at the advantages and drawbacks of AI alt text.
Every website should include accurate alternative text (alt text) for important images. It’s crucial for accessibility: Text alternatives are required by the very first success criterion in the Web Content Accessibility Guidelines (WCAG).
Of course, writing alt text takes time — not much time, but time. If you’ve got a large eCommerce website with thousands of images, spending 10-30 seconds on each alt text field might seem unrealistic.
For many developers, the obvious solution is to use artificial intelligence (AI). Tools like ChatGPT can accurately analyze visual content to generate alt text in a fraction of a second. Some platforms like Adobe Commerce (formerly Magento) now include alt text generators that use AI for that purpose.
Those tools can be useful. But before you use AI to generate alt text, there are a few important caveats. Here’s what you need to know.
Alt text provides human users with context, and AI isn’t always perfect
The purpose of text alternatives is to provide real human users with an equivalent source of information. In other words, if you have an image on your page that conveys something important, you need an alternative that serves the same purpose.
AI tools can be accurate, and eventually, they’ll get better at recognizing context. Currently, however, they’re quite literal: They describe the content of the image, but they might include irrelevant information or miss important characteristics.
For example, let’s say your website has a photograph of a man in a white coat. The alt text might simply read, “man in a white coat.”
The issue is that the meaning of that image can change depending on its context. Visual users can usually perceive that context:
- If the image appears on a delicatessen’s website, human users would understand that the man is a butcher.
- If the image appears on a physician’s website, the reader would understand that they’re looking at a physician.
- If the image appears on a clothing store’s website, human users would focus on the coat.
AI text generators might miss context, and worse yet, they might make assumptions about context. They might describe the man as a butcher, which would be especially problematic if you’re building a website for a physician or a clothing store.
AI alt text may also provide irrelevant details, which can slow down people who use screen readers (software that converts text to audio or braille). Generally, you want your alt text to be brief, concise, and to the point — too much info isn’t helpful.
Related: How Screen Readers are Used in Accessibility Testing
Adding unnecessary alt text can make user experiences worse
Some developers are (understandably) excited about AI, and they use AI tools to apply alt text to every image on their websites. That’s a mistake, because some images are purely decorative — they improve content aesthetically, but they don’t convey anything.
Screen readers treat alt text as important content, and they’ll generally announce the description to the user. If you add alt text to an image that doesn’t need it, you might force people to spend time listening to irrelevant content.
An image doesn’t need alt text if it is:
- Pure decoration and provides no information.
- Already described on the page in text.
- A background image and not the primary content.
Another quick note: If an image doesn’t need alternative text, it must still have a null ALT attribute, which tells screen readers that they can safely skip the image without announcing it.
For more guidance, read: How Do I Know If an Image Needs Alt Text?
AI will continue to improve over time, and it’s still vital for certain use cases
For some websites, there’s no great alternative to AI-generated alt text. Instagram, for instance, has millions of images that don’t have accurate alt text, and authoring alt text for every single image is impractical. AI fills in the gaps, providing a better (if imperfect) experience for users with visual disabilities.
If you absolutely cannot author alt text — or if you need time to write descriptions for a large number of images — current-generation AI tools are useful. We also expect that they’ll get better at recognizing context over time.
As we’ve discussed in other articles, AI has strong potential to revolutionize digital accessibility. That’s particularly true for tools that are specifically designed to improve web accessibility by following WCAG.
But if you have the option, authoring alt text is a better choice. It only takes a few seconds, and it provides users with a much better experience. To learn the best practices of authoring alt text, read: 5 Steps for Writing Alt Text for Accessibility.