WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Is "label" a valid attribute for the img tag?

for

From: Patrick H. Lauke
Date: Apr 11, 2024 4:06PM


On 11/04/2024 20:32, Jim Homme wrote:
> Hi,
> This is about me trying to read the Mozilla documentation correctly. When I look up the img tag, "label" is not listed as an attribute. I'm comparing this to what the JAWS screen reader is howing me about an img tag internally here. I'm doing this because the image seems to be displaying to JAWS as a file name such as "image 1.png". Could this also be some sort of JavaScript thing?

"label" is not a valid HTML attribute for an <img> element, no.

And what JAWS is announcing there sounds to me like it's just reading
out the source/filename of the <img> element in the absence of any
appropriate alt attribute.

Unless I'm misunderstanding your question.

P
--
Patrick H. Lauke

* https://www.splintered.co.uk/
* https://github.com/patrickhlauke
* https://flickr.com/photos/redux/
* https://mastodon.social/@patrick_h_lauke