WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Opinions/Facts on Alt Images

for

From: Jared Smith
Date: May 31, 2016 1:58PM


I don't think there's one "best" answer to this question. Nothing requires
that alternative text be located in the alt attribute. Text that is
adjacent to or otherwise associated with the image can be sufficient (in
this case the image would be given alt=""). If you place the text in the
alt attribute, you will cause repetition of content. If you don't, then the
user may not be aware that the image is present.

Personally, I tend to lean more toward alt="" in these cases because the
repetition negatively affects all screen reader users whereas it is less
likely that a screen reader user may want to utilize the image itself (and
even then, they still could find and access the image even with alt=""). If
the presence of the image is important, then repetition may be a better
approach.

Of note, however, is that if the image is the only thing within a link,
then it MUST have alternative text, even if that alternative text is
redundant with adjacent text.

If it is ever supported, <figure> and <figcaption> would be a way to
associate the text to the image in a way that avoids repetition, yet still
provides an indication that the image is present and conveys content.

Jared