role=presentation not recognized as valid
See original GitHub issueExpectation: Using role=presentation (or role=none) in img passes. Example:
Actual: If no ALT is being used, the error returns “Ensures elements have alternate text or a role of none or presentation” - if role=presentation is used, the error returns “ARIA role must be appropriate for the element”. The same happens, when role=none is being used. Example code =
<img src="https://dummyimage.com/340x160/444/888" role="presentation">
Motivation: I do not want to use alt=“” in each presentational img and use its proper role.
axe-core version: 3.3.1
axe-extension (Chrome) version: 3.9.0
Browser and Assistive Technology versions
Browser : Chrome version: 76.0.3809.100
System : Mac OSX version: 10.13.6
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
html - role="presentation" on button not working in firefox and ...
I might be wrong but setting aria-expanded="false" on the container ( <li> ) should at least be valid and hide the content from...
Read more >ARIA: presentation role - Accessibility - MDN Web Docs - Mozilla
The presentation role and its synonym none remove an element's implicit ARIA semantics from being exposed to the accessibility tree.
Read more >Accessibility rule: Ensure elements marked as presentational ...
Checks every element with role=“none” or role=“presentation” to ensure they do not have a global ARIA attribute and are not focusable. Learn more:....
Read more >WAI-ARIA: role=presentation - DigitalA11Y
In this case, the user agent ignores the presentation role and exposes the element according to its implicit native semantics. However, user ...
Read more >Role attribute has valid value[proposed] | ACT Rule | WAI - W3C
This rule assumes that elements with a role attribute have their intended structure and relationship conveyed through some sort of presentation. If it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Tested, working as expected.
Tested Environment: Axe-coconut - 4.0.0.29504v Chrome - 77.0.3865.120v OS - Windows 10 64 bit.
Per spec
I’m reading this as the “missing” spec per Wilco’s comment.