a11y web development tips and tricks - mhulse/mhulse.github.io GitHub Wiki
Use an empty alt
attribute:
<img src="foo.jpg" alt="">
In theory
aria-hidden="true"
should work, but it would require the consuming technology to understandaria
. An emptyalt
attribute is the standard for assistive technologies (like screen readers) denoting that the image should be ignored.
If it’s an icon font or <svg>
image, add role="img"
and aria-hidden="true"
.