Closed cyns closed 3 years ago
Hi @cyns welcome back!
The definition of figure is one or more images
this is not correct, the definition of figure
in ARIA is:
A perceivable section of content that typically contains a graphical document, images, code snippets, or example text...
The figure element represents some flow content, optionally with a caption...
I spent some time kicking this idea around and the results were not particularly good.
tldr; aside for a few instances, placing a role=figure
on an <img>
caused the image to become completely hidden from screen readers.
Regarding the complex SVG scenario, even if role=figure
on an image had better support, this wouldn't be a viable use case as screen readers can't enter the SVG's DOM when its a source of an <img>
element. However, this can work just fine for an actual <svg>
, and that element does allow any role.
Per the above, I'm going to close this issue as I don't want to allow something that'd make the content inaccessible.
The definition of figure is one or more images, but images can be quite complex internally. One use case would be SVG images with sub-parts and text inside. Figure is a kind of image.