alt is easier than people think
Apr. 10th, 2023 11:09 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
People are overthinking alt text. The guidance is pretty simple for normal images:
- Have alt text on your images.
- If the image is purely decorative, like a curly line, space-filler clip art, or redundant with text, then the alt should be
alt=""
. But it should still be present. - Otherwise, briefly describe the part of the image that's relevant to sighted readers in the context in which you are choosing to post it. This is up to you; you are the one who finds this image interesting. This usually, but not always, includes any visible text on the image.
- You don't need to say "image of".
- If you need something very long (eg. for a chart or an infographic), put it in plain text somewhere, either immediately below the image or linked immediately below it. That helps sighted people, too.
- Don't include information that's not available to sighted people looking at the picture. The alt is not a caption. Information like "generated with midjourney", "taken with a Canon 400", "me and elvis taking his Jet down to Las Vegas" are all captions, not alt. Put them in visible text near the image. (The exception is images of clearly identifiable objects which sighted people will be expected to recognize without more information: "The Mona Lisa", "The Eiffel Tower" are reasonable alt.)
- Don't use it for punchlines! The alt has a purpose! (You can be witty, as long as you don't disrupt that purpose.)
There you go. That's it!
(It gets more complex for SVG and images/sprites placed with CSS, but the principal is the same.)