Re:Annoying website features I face as a blind person
by strogonoff on Thursday September 10, 2020 @12:38PM
(#24433926)
Decorative graphics is prime example use case in WAI-ARIA docs for the presentation role. Its purpose is to remove the element from the accessibility tree.
By comparison, alt="" is much less direct and obvious. I consider it an unfortunate historical quirk that it is not the same as a nonexistent alt attribute.
For decorative images I recommend using presentation role to make the intention clear.
This doesn't always do what you think it does. The presentation role is for negating any accessible role implied by the use of a particular HTML element, not for hiding it entirely. For example, you've used an unordered list for appearance/styling, but it only contains one child item. In those circumstances, a list of one thing is semantically meaningless and role="presentation" on the ul is completely appropriate.
The fact that applying the presentation to an img removes it from the page for screen reader users shouldn't be relied upon.