Alt text should communicate the purpose or meaning of an image in its page context. It is not a hidden keyword box and it does not need to describe every decorative detail. The same image can deserve different alt text on different pages because its purpose can change.
Decide whether the image is informative or decorative
If an image contributes information that is not available nearby, give it a concise text alternative. If it is purely decorative or repeats information already present as text, an empty alt attribute can prevent unnecessary repetition for screen-reader users.
Describe purpose, not every pixel
For an informative photograph, explain the detail that matters to the surrounding content. For a functional image used as a link or button, communicate the action or destination. A literal inventory of colors and objects is often less useful than the image’s purpose.
Handle charts and complex graphics differently
A short alt attribute cannot carry an entire chart. Use concise alt text to identify the graphic and provide the important data, summary or explanation in nearby text or another accessible description.
Avoid keyword stuffing
Search engines can use alt text to understand images, but forcing repeated keywords creates poor accessibility and can look spammy. Write naturally, use the page topic only when it genuinely helps describe the image, and avoid copying the same alt text to unrelated images.
Do not use filenames as descriptions
Values such as IMG_4821.jpg or product-final-v7.png usually tell users nothing about the image. An audit can flag filename-like or missing values, but a human should decide what the image means in that specific context.
Review alt text during content updates
When an image moves to a new article or its surrounding text changes, re-check the alt text. A description written for a product gallery may not make sense when the same image is reused as an instructional diagram.
Worked example
Example
On a guide about image compression, “Comparison of JPEG artifacts around small text at 40% and 80% quality” is more useful than “image compression SEO tool free online.”
Practical checklist
Before you finish
- Use concise, contextual descriptions for informative images.
- Use alt="" for truly decorative images rather than omitting the attribute.
- Describe the action for functional images used as controls or links.
- Put complex chart detail in visible text, not only in alt.
- Audit for missing and repeated values, then edit with human judgment.
Common mistakes
What to avoid
- Stuffing the same keyword into every image.
- Describing decorative flourishes that add no information.
- Leaving meaningful images with missing alt attributes.
- Using the file name as alt text.
Further reading from authoritative sources
Use these references when you need the underlying specification or platform guidance.