4 minutes reading time (869 words)

AI generated Alt text


There is a place and a time for everything. The current trend is to use Generative AI and LLM (large language models) for everything, but we're not there yet. Although technically inaccurate I will refer to this as AI throughout this article.

Describing Images

There are many tools and applications available today that claim to be able to describe an image in words using AI. On the surface this would make them an ideal tool that you can utilise to create alt text descriptions for every image on your site - making your site more accessible and usable for all. But in reality without the context the description is as useful as a chocolate teapot.

What is Alt text?

Alternative (Alt) Text serves to explain the purpose of an image within the context of a document or webpage. Screen reader software reads it aloud to users, search engines index it, and it appears on the page if the image fails to load.

The Web Content Accessibility Guidelines (WCAG) requires alternative text as part of its first Success Criterion (SC), “Non Text Content.” To meet that criterion, text alternatives must serve an “equivalent purpose" to the image.

To be equivalent, alt text must be accurate and appropriately descriptive, within the context of the website. In other words the same image used on two separate pages or web sites will usually require a different Alt text.

One step forward, two steps back

Using AI you are now able to ensure that all the images on your site will have some text in the description field and your site will pass any automated accessibility tests for the presence of image descriptions (alt text). But just like the chocolate teapot the description that is generated is completely useless and as such will fail "real world" accessibility and user tests.

In tests all of the tools that I have checked have been able, to varying degrees of detail and accuracy, provided a description of the image. However they are describing the image outside of the context of the entire content. At first glance the tool looks good, but when you try to use it then it all falls apart.

When Artificial Intelligence is not very Intelligent

When you ask the AI to describe the image then it will describe the image out of context or with a level of information that results in less accuracy and relevance for where you are using the image.

Example - Usage - without context

Credit: By Jordan Reay - Wembley Stadium, CC0

AI Generated Alt text with no context: Aerial view of a large, packed stadium with a rugby game in progress on the field.

Hand written Alt text on a page complaining about the use of large stadiums: Wembley Stadium is so large that smaller sports like Rugby can not fill the stands.

Hand written Alt text on page about corporate sponsorship: The middle tier of Wembley Stadium is empty as its reserved for corporate sponsors who only want to watch football.

Hand written Alt text on page about the quality of the playing surface: The grass pitch at Wembley Stadium is in perfect condition at the end of a game of rugby.

Example Usage - too much information

Credit: By Amie Fedora, CC-ND-2

AI generated Alt text with no context: A hand holding a red apple with a leaf attached, against a background of green grass, trees, and stacked wooden crates.

Hand written Alt text with appropriate information in context: Freshly picked red apple

Example Usage - context is everything

The Alt text description for this next image will vary greatly depending on the context.

Credit: By Nico van Leeuwen

AI generated Alt text A man stands at a podium giving a presentation on accessibility to an audience.

Handwritten Alt text on a page about Brian Teeman Brian Teeman speaking about accessibility at a Joomla conference

Handwritten Alt text on a page about Accessibility Conference attendees sit to listen to a presentation about accessibility

Handwritten Alt text on a page about JoomlaDagen 2023 Keynote presentation on web site accessibility for Joomla users in the Netherlands

It doesn't harm anyone?

Even if you ignore the fact that you will still have an inaccessible web site when using an AI Alt text image description tool you might be saying "what's the worse that can happen, I know it's not perfect but surely its better than nothing at all."

The reality is that bad Alt text can have many negative impacts: people may be offended by inherent bias in the LLM and thus view a brand negatively; blind and visually impaired people may be misinformed about a product they are purchasing; search queries produce inaccurate results; and many more.

I hope I have shown you enough examples of why, when it comes to Alt text descriptions of images, the current AI implementations are not ready yet. In theory it should be possible to generate text alternatives that serve an “equivalent purpose" to the image within some very restrictive parameters. But we're not there yet.

So don't chase the trend or be fooled by clever marketing - the only way to create accessible text alternatives is to write them yourself.

I've a secret to share, but dont tell anyone
They Cannot Be Talking About Me, Can They? Learn f...


Already Registered? Login Here
No comments made yet. Be the first to submit a comment

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/