Alt Text
Alt text (alternative text) are words inserted into web page code that are used to describe the nature or content of an image. Alt text is announced by screen readers to describe the image to users that are not able to access the visual content.
The level of detail in alt text is dependent on the purpose the image serves:
- Active Image refers to an image that is a link to other content. The alt text should detail what action will result from clicking on the image. An alt text of 'link' will not be enough information to tell a user where the link will take them.
- Non-active images convey information, but do not link to other content. If an image displays a visual representation of any information that is relevant to the user, the alt text should provide the full detail of what a sighted user would take away from the image on the page. Examples of images requiring detailed alt text are a picture that shows an example of the content being discussed or a chart containing visual data.
- Decorative images might be simple style elements that do not contribute to any key information on the page. In this case, a screen reader reading the alt text may become inconvenient for a user. In this case, the alt text can be set to null. Please contact AEM support for setting decorative image alt text to null.
- Images of text are highly discouraged in web design. When absolutely necessary the image of text should contain an alt text with the same text that is in the image.
Best Practice
- Always use alt text for all images posted on websites.
- Do not use the filename, "photo", or "image" to describe an image.
- Always accurately describe the image for images that convey meaning or support written information.
- Always use an action word for images that contain a link or require an action.
- Avoid using images of text. If it must be used, provide the text in the alt text.
- Always provide a long description as a companion for complex graphics like graphs and diagrams.
- Always describe the image as a whole, even if grouped images are used