Distinguish information, function and decoration

For an informative image, describe what matters to the content. A photograph of a connector may need its position or visible connection, not the wall color behind it. Stay with what is actually shown. Alternative text should not claim a product property that the image cannot demonstrate.

When an image alone serves as a link or button, its function matters. W3C recommends describing the action or destination rather than merely the symbol's appearance. A printer icon, for example, represents printing rather than an article about printer shapes.

Purely decorative images receive empty alternative text in the appropriate HTML context. That is different from accidentally omitting the attribute. Decide deliberately according to purpose. With linked images, take particular care not to leave an unnamed interactive control.

Check the image’s role in its actual sentence

A photograph of the same printer can serve different purposes in two articles. In a general introduction it may simply show the device. In an instruction it may show the open cover where the next action begins. In the second case, describe the relevant visible information instead of copying the generic wording from the first article.

If all necessary information already appears immediately beside the image as ordinary text, consider whether another description merely repeats it. A complex diagram may instead need a longer explanation in the body so the relationships are understandable. Do not squeeze every data point into one overloaded alternative. What matters is that the information remains available and intelligible in context even when the image itself is not viewed.

Read the surrounding text

If a caption already explains all essential information, avoid unnecessary verbatim repetition. Alternative text can supply the relevant part still missing. For complex charts, a brief description may be insufficient; the actual information then needs an appropriate fuller text representation as well.

Consider a photograph of someone reviewing a form at a desk. For a general article about content review, that action may be enough. For instructions concerning one specific error, the photograph may not be precise enough at all. An invented detailed alternative text cannot retrospectively make an unsuitable image suitable.

Inspect the saved version

After entering it, check the actual image use on the page. Some systems automatically reuse filenames or previously entered text across several locations. That may fit the first use but fail in another context. Inspect the output rather than only the media-library entry.

For language versions, write text in the page's language. Translation should convey the same information without inventing additional details. Sampling can check the process, but a complete image review requires inspecting all relevant uses. Keep those scopes distinct in the documentation.

Sources and further reading