Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should <img> support role=figure? #319

Closed
cyns opened this issue May 8, 2021 · 2 comments
Closed

Should <img> support role=figure? #319

cyns opened this issue May 8, 2021 · 2 comments
Labels
a11y-needs-resolution Issue the Accessibility Group has raised and looks for a response on. Allowed roles Pertaining to the allowed roles of HTML elements wontfix

Comments

@cyns
Copy link

cyns commented May 8, 2021

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.

@LJWatson LJWatson added the a11y-needs-resolution Issue the Accessibility Group has raised and looks for a response on. label May 8, 2021
@stevefaulkner
Copy link
Collaborator

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...

in HTML

The figure element represents some flow content, optionally with a caption...

@scottaohara
Copy link
Member

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.

@scottaohara scottaohara added Allowed roles Pertaining to the allowed roles of HTML elements wontfix and removed a11y-needs-resolution Issue the Accessibility Group has raised and looks for a response on. labels May 9, 2021
@w3cbot w3cbot added the a11y-needs-resolution Issue the Accessibility Group has raised and looks for a response on. label May 10, 2021
@michael-n-cooper michael-n-cooper added a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. and removed a11y-needs-resolution Issue the Accessibility Group has raised and looks for a response on. labels May 12, 2021
@w3cbot w3cbot added a11y-needs-resolution Issue the Accessibility Group has raised and looks for a response on. and removed a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. labels May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y-needs-resolution Issue the Accessibility Group has raised and looks for a response on. Allowed roles Pertaining to the allowed roles of HTML elements wontfix
Projects
None yet
Development

No branches or pull requests

6 participants