Review the four different image types.
Decorative example 1:
<img src="decorative.jpg" alt="">
Informative example 1:
<img src="informative.png" alt="Aerial view of the
Sydney Opera House with the Sydney Harbour
Bridge and city skyline in the background.">
Functional example 1:
<button>
<img src="functional.png" alt="Dismiss">
</button>
Functional example 2:
<a href="#">
<img src="#" alt="Wayne Enterprises home">
</a>
This does not need to be a functional image as there is text available that describes the function. So, it is a decorative image instead:
<button>
<img src="functional.png" alt="">
Dismiss
</button>
Complex example 1:
Note: aria-details currently has poor assistive technology support and should not be relied upon as the sole way to provide additional detailed information. In this example, screen reader users can still navigate to the Image description disclosure and access the full description.
<figure class="example">
<img src="image-complex.png"
alt="Venn diagram depicting content category
relationships. Detailed description below"
aria-details="complex-image-details"
>
<figcaption>
<details id="complex-image-details">
<summary>Image description</summary>
<div class="testing-images">
<h3>HTML content categories include:</h3>
...
</div>
</details>
</figcaption>
</figure>