Open gaiety-deque opened 2 months ago
Interesting. Even if it's in the accessibility tree, assistive technologies will probably ignore it. I think this needs further testing before we do anything with it. The other thing that could be going on here is that Chrome DevTools is misleading us. Chrome DevTools sometimes shows things in the accessibility pane that isn't in the actual accessibility tree. I think it does that to try to be helpful, or maybe its just that the CDP doesn't provide all the information and they need to fake it a bit. Not sure.
In either case, its worth testing this with actual assistive tech.
Product
axe-core
Product Version
4.9.0
Latest Version
Issue Description
Expectation
A decision should be made about how axe-core handles images with empty alt attributes (not
unset
ones) with regards to implicit VS implied roles as the spec specifies when using non-Global aria attributes likearia-level
.Actual
axe.commons.standards.getGlobalAriaAttrs
is leveraged for the region rule and possibly others, when the spec may mean we need to be more broad in cases that usegetRole
for images with empty alt attributes.How to Reproduce
The following code behaves inconsistently according to the accessibility tree. In Firefox it is removed from the tree, in Chrome it is in the tree with an empty alt.
Additional context
Presentational Roles Conflict Resolution is very specific about the behavior between elements with inherited VS implicit roles. An image with an empty alt attribute has an implicit
img
role I'd suspect the following would be the case: