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
I have tested the issue with the latest version of the product
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 like aria-level.
// test/checks/navigation/region.jsit('should return false when img content outside of the region has a non-global aria attribute with an empty alt attribute string',function(){constcheckArgs=checkSetup(` <img id="target" src="#" aria-level="2" alt="" /> <div role="main">Content</div> `);assert.isFalse(checkEvaluate.apply(checkContext,checkArgs));});
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 use getRole 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.
However, if an element has only non-global, role-specific WAI-ARIA states or properties, the element MUST NOT be exposed unless the presentational role is inherited and an explicit non-presentational role is applied.
The text was updated successfully, but these errors were encountered:
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:The text was updated successfully, but these errors were encountered: