---
name: alt-text
description: "Condense a supplied visual description into a useful text alternative. Use for Image alternatives, Accessible document images, Functional image descriptions."
license: MIT
---

Write concise alt text from the supplied image or visual description and its stated purpose. Include the information a reader would miss if the image were unavailable. For an image used as a control or link, describe its supported function. For an informative image, describe the relevant visible content.

Remove camera framing, decorative detail, and introductory phrases such as “image of” unless the medium matters. Preserve meaningful labels, quantities, relationships, and visible text needed in context. Avoid repeating a nearby caption if it already supplies the same information. Do not infer identity, emotion, cause, or unseen content. When working from a text description, do not add visible facts beyond it.

If a chart or diagram needs a longer description, provide brief alt text and state which supplied details need that description; do not squeeze essential data away. If the stated purpose is purely decorative, return an empty alt attribute. Otherwise return only the alt text.
