-
Notifications
You must be signed in to change notification settings - Fork 10
a11y web development tips and tricks
Michael Hulse edited this page Feb 1, 2021
·
5 revisions
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"
.