Use the arrow keys to navigate between menu items.

Reader question: Why do we still need the alt attribute when we have AI?

2 minutes read

A reader who preferred to remain anonymous asked:

Why do we still need the alt attribute for images when we have AI? Models have evolved a lot now and they can pick up the image of a dog or whatever and add the alt text.

They're not wrong. AI has come a long way, and it's pretty nifty at recognising a dog in a photo. But it's not a silver bullet for alt text. Let me break it down.

1. AI doesn't distinguish between meaningful and decorative images

You only need to add alt text to meaningful images on your web page. Decorative images, like backgrounds or borders, get a pass.

How do you tell if an image is meaningful? Ask yourself, if you removed this image, would you still get the same information from the page?

If the answer is no, then this is a meaningful image and it needs an alternative text. If yes, then this is a decorative image and it needs an empty alternative text. That’s different than no alternative text!

2. AI doesn't have the context

AI systems look at images in isolation. No matter how detailed AI will describe that picture of a dog, it will always lack context. I'll give you an example.

Last year, my dog Scooby was diagnosed with bone cancer. We had to amputate his front leg. I have a photo of him on my desk. In the photo, he's sitting on the floor looking straight at the camera.

AI saw a "black dog sitting on the floor." Accurate, but with a total lack of emotion.

Scooby had to have surgery to fight cancer. In the photo, he's at the clinic after the last round of chemo. What's most important in this photo isn't even in the photo. AI had no context for it, so there was no way it could have got it right.

Here's the thing.

There's nothing stopping you from asking AI to generate the alt text for your images. But in the end, you're going to need to check its work.

But not providing any alt text and hoping AI does all the grunt work for you is like hoping your GPS understands your need for a scenic route. It might get you where you're going, but the essence is lost.

Did you enjoy this bite-sized message?

I send out short emails like this every day to help you gain a fresh perspective on accessibility and understand it without the jargon, so you can build more robust products that everyone can use, including people with disabilities.

You can unsubscribe in one click and I will never share your email address.