32. Image with no alt attribute


Image no alt incorrect example

Description: The image does not have an ‘alt’ attribute (alt=””).

Context: All images are expected to at a minimum have an alt attribute, even if it is empty to allow screen-readers to decide how best to read out content regarding the image.

<img src="https://manoa.hawaii.edu/wp/wp-content/uploads/2018/10/google-open-tray-icon.png">

How to fix it: It’s important all images have the attribute for alternative text regardless of whether an alternative text is added. A screen reader knows how to handle both an empty alt attribute and one with a text. If there is no attribute some screen readers will compensate and read the path to the image instead, which will often give no value to the end user. If you are using a CMS (Content Management System), the default setting should be that an empty alt attribute is added to all images.

<img alt="Open tray" src="https://manoa.hawaii.edu/wp/wp-content/uploads/2018/10/google-open-tray-icon.png">

Techniques: F38F65H37