Alt text, written properly
Alt text exists so that someone who cannot see the image still receives its information. That is its purpose, and writing it for that purpose also happens to be what performs best.
- Good
- "A handmade blue ceramic mug with a rough unglazed base, on a wooden table"
- Useless
- "mug"
- Spam
- "buy mug cheap mugs ceramic mug online best mug"
- Redundant
- "Image of a mug" — screen readers already announce that it is an image
Two rules people miss. Decorative images should have an empty alt attribute, not a missing one, so assistive technology skips them silently. And if the image is a link, the alt text should describe where the link goes, because that is its function.