Introduction
The `alt` attribute is essential to ensure that your emails are accessible and easy to understand. For every visual of an informative nature, adding alternative text via the alt attribute is therefore good practice, both technically and inclusively.
What's the ALT attribute for?
The 'alt' (for "alternative") attribute is used to add descriptive text to an image. This text is displayed if the image cannot load, and is read by assistive technologies, such as voice screen readers for the visually impaired.
How do you add an ALT tag to an image?
In the case of HTML content:
The 'alt' attribute is positioned directly in the <img> tag:
<img src="path_to_your_image.jpg" alt="Description of the image or its role in the email">
In the case of a drag & drop editor :
In Factorly, a dedicated field is available on the image component to insert this alternative text easily.
Good practices
- Be concise and as needed describe what the image represents or what it is used for.
-
For the sake of clear understanding of the message, a decorative image will not have alternative text.
Conclusion
Adding an `alt` attribute to your informative images is a simple but valuable step in making your emails more accessible and understandable. Avoid putting it on decorative images, however, as this unnecessarily burdens screen readers.