Product: axe-core
Expectation: <img> with role button and accessible name is a valid element.
Actual: axe core 4.3.3 reports it as a violation of aria-allowed-role rule.
Motivation: as described in https://www.w3.org/TR/html-aria/#el-img-no-alt <img> with no alt but WITH accessible name may have same roles as https://www.w3.org/TR/html-aria/#el-img including button.
axe-core version: 4.3.3
Browser and Assistive Technology versions: Chrome/92.0.4515.159
For Tooling issues:
- Platform: Windows
Repro minimal example:
<img role="button" aria-label="Search">
axe.run({
runOnly: ['aria-allowed-role']
}, function (err, results) {
console.log(results.violations);
});
Result (axe-core 4.3.3):

Product: axe-core
Expectation:
<img>with rolebuttonand accessible name is a valid element.Actual: axe core 4.3.3 reports it as a violation of
aria-allowed-rolerule.Motivation: as described in https://www.w3.org/TR/html-aria/#el-img-no-alt
<img>with no alt but WITH accessible name may have same roles as https://www.w3.org/TR/html-aria/#el-img includingbutton.Repro minimal example:
Result (axe-core 4.3.3):