figure element (mis)use for image Descriptions

When an image file has a Description and is inserted in a page, the description is displayed above the image and is contained within a figure element. Having a visible caption paired with an image is a desirable feature but this is an incorrect use of the figure element.

The img element should be within the figure element, not preceded by it. The Description text displayed as a caption should also be within the figure element but also within a figcaption element. Additional block elements like a paragraph element are unnecessary but not prohibited.

Theoretically, an img element could omit the alt attribute when it is within a figure that contains a figcaption. However, Internet Explorer 11 "provides no semantic information via accessibility APIs" for figure or figcaption elements. Additionally, there are differences of opinion about whether captions, as they are commonly written, are sufficiently descriptive of image contents. Therefore, best practice is for img elements to have alt text even when contained within a figure with a figcaption (title attributes on images or parent elements are often not an accessibility aid, can't themselves be accessed, and should be considered an optional supplement).
7 people have
this problem