You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several popular browsers that do not treat images with an empty alt attribute (alt="") as having a role of presentation but instead add the img element to the accessibility tree with a semantic role of either img or graphic.
IMO, this is quite outdated. Also, when checking the WPT test for el-img-empty-alt, it shows consistent support.
Case 2 - Missing WPT testcase:
Images can have their role set to presentation through an empty alt attribute. Presentational Roles Conflict Resolution does not specify what to do if such an image is focusable (it only specifies what to do in case of explicit role="none" or role="presentation"). Some browsers expose these images and some don’t. Thus, this rule may fail for technologies that expose these without creating an accessibility issue for users of other technologies.
Also, this one, in my opinion, should be updated a bit. I'm fine with keeping the first part (raised a point in the WAI-ARIA group about that one - w3c/aria#2415), but I think we should change "Some browsers expose these images and some don’t," since major browsers now expose the element with a role of "image," which triggers the presentational roles conflict resolution.
Case 1 - Existing WPT testcase:
IMO, this is quite outdated. Also, when checking the WPT test for el-img-empty-alt, it shows consistent support.
Case 2 - Missing WPT testcase:
Also, this one, in my opinion, should be updated a bit. I'm fine with keeping the first part (raised a point in the WAI-ARIA group about that one - w3c/aria#2415), but I think we should change "Some browsers expose these images and some don’t," since major browsers now expose the element with a role of "image," which triggers the presentational roles conflict resolution.
I'm planning to create a PR for a WPT test for:
<img alt="" data-testname="focusable img[empty alt]" class="ex" tabindex="0" data-expectedrole="image">
returns the following locally:
which demonstrates consistent support.
The text was updated successfully, but these errors were encountered: