WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Glyphicons and aria-label or alt=


From: glen walker
Date: Aug 14, 2020 2:22PM

> The alt attribute is only valid on <img> elements (or, for those of us
> who remember olden times, for <area> elements, I think for <object>
> elements as well, but nothing else).

Just for completeness, the alt attribute is also allowed on the <input>
element but only if type="image".

You can find more info on aria-label support at
https://www.w3.org/TR/using-aria/#label-support. It talks about specifying
a role as both Patrick and Birkir talked about.