Can the tag replace the function of the alt attribute within the tag?
The <figcaption>
and the <alt>
tags serve different functions. <figcaption>
Is used by all readers and should be more about adding extra information that is not contained in the image or give more context to an image and how it fits into the flow of the content. <alt>
tags are used by screen readers and when an image fails to be displayed. They should simply describe the image. For these reasons, an <alt>
tag and a <figcaption>
tag shouldn’t contain the exact same text. For accessibility it is best to always include an <alt>
tag even if you have a <figcaption>
because some screen readers might not automatically read them.