-
Notifications
You must be signed in to change notification settings - Fork 126
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
role=img should allow accName other than aria-label or aria-labelledby #1398
Comments
role=img is allowed for other HTML elements that can be labeled with the title attribute. Furthermore, role=img is allowed on SVG graphics that can be labeled with the title element or per text content |
I agree. This is not a coding best practice, but it should not fail ARIA validation.
When you say "labeled with," if you mean... <svg role="img" aria-labelledby="svg-title">
<title id="svg-title">HTML5 logo</title>...
</svg> ... then that's a true statement, but not relevant to this issue, because it already passes with or without my proposed edit. If you mean without |
Yes, I meant that. And the title element is not "name from content", but "name from author". I think that here the AccName specification is unclear if within role=presentation labeling with author elements like label, title, caption etc. should be possible or not |
You're right @JAWS-test, my mistake. A |
rewording of how a _name_ (not necessarily a “label” - so changed that word) can be specified for a `role=img`, so as to not imply that a host language naming mechinism would not be allowed. However, I’m wary of explicitly stating a host language naming mechanism could be used here, as I don’t think it’s necessary to do so in this spec.
Requested change:
I'm requesting
role=img
be edited to use @mcking65's phrase from pull request #785 comments: authors MUST provide a label, which can be done with the aria-label or aria-labelledby attributeThis was in response to @carmacleod's draft in issue #783 comments: In order for elements with a role of img to be perceivable, authors MUST provide a label determined by the accessible name calculation.
Currently:
The ARIA spec for
role=img
currently says, "authors MUST provide a label using the aria-label or aria-labelledby attribute."However, in some cases
role=img
can get its accessible name from a name from author mechanism, without actually using eitheraria-label
oraria-labelledby
. The ARIA spec should not prohibit these cases.role=img
on an<iframe>
element, which can get its accessible name from atitle
attribute.role=img
is "NOT RECOMMENDED" for an<img>
element, but a valid reason may exist to use it, such as @scottaohara's workaround for a Safari bug. In this case thealt
attribute of an<img>
can still provide its accessible name.The text was updated successfully, but these errors were encountered: