WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: Brian Lovely
Date: Apr 12, 2024 9:28AM


Hi Jim,

Label is not a valid HTML attribute, as Patrick stated. The correct way to
"label" an img is with the alt attribute. The Mozilla Developer Network
documentation for img
<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes>lists
the available attributes for the img element.

>
>
> 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?
>
>
>