On Day 41 we learned the basics of writing alt text, but writing good alt text takes some practice. These best practices can help.
Best Practices for writing alt text:
- Write in sentence case.
- Include just the description, not introductory text like "An image of" or "Image of" as screen readers will say something like, "Image: Image of a red train going through a dark tunnel."
- Indicating the image is
a graph, photo, or screenshot is okay. It will often sound like Image:
Graph showing the number increase in sales" or "Image: Photograph of Mount Hood at sunset"
- Include any text in the image (for example legacy images that haven't been updated)
- If the image is complex or needs more of a description, add a detailed caption to the image.
#100DaysOfA11y