… and the text is also present as real text nearby.
Use an empty alt attribute. See Decorative Images.
… and the text is only shown for visual effects.
Use an empty alt attribute. See Decorative Images.
… and the text has a specific function, for example is an icon.
Use the alt attribute to communicate the function of the image. See Functional Images.
… and the text in the image is not present otherwise. Use the alt attribute to include the text of the image. See Images of Text.
If no, the image contains no text…
If yes, the image is contained in a control…
Use the alt attribute to communicate the destination of the link or action taken. See Functional Images.
If no, the image is not contained in a control…
If yes, the image contributes meaning…
… and it’s a simple graphic or photograph.
Use a brief description of the image in a way that conveys that meaning in the alt attribute. See Informative Images.
… and it’s a graph or complex piece of information.
Include the information contained in the image elsewhere on the page. See Complex Images.
… and it shows content that is redundant to real text nearby.
Use an empty alt attribute. See (redundant) Functional Images.