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.