WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Alt Text on Graphic Links

for

From: Jonathan Avila
Date: Apr 27, 2020 6:35PM


Hi, it sounds like you are asking if the inline image inside a link is decorative does the image need alt text. The image doesn't need alt text but I'd say you would want to still mark the image as decorative (e.g. alt="", role presentation) -- even though it's not needed it would be important to mark it as decorative to avoid any confusion. This might be different for different constructs -- for example, I'd read the SVG accessiblity mappings document and it seems to indicate that for an SVG as a child of an element like a link or button the SVG could automatically be treated as decorative without a role presentation -- but have not seen such as claim for inline images.

Jonathan

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Heather Mariger
Sent: Monday, April 27, 2020 5:39 PM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: [WebAIM] Alt Text on Graphic Links

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Greetings,

I have a technical question that is a bit beyond my ken:

We have a website with several graphics that are also links. I noticed that the graphics do not have alt text and checked with WAVE to be sure.

When we let the developer know, he responded:

> From what I remember regarding Accessibility rules is that if the
> image is surrounded by a Hyperlink, then technically it's in
> compliance because the link tells them where they are going.
>
> If the only purpose the image serves is for display then yes an alt
> tag is required.
>
> So the reason this hadn't been brought up before is because the link
> had been set using CSS background property and the browser never would
> have told them there was an image, because it never saw the tag <img>
> in the html DOM.
>
I did test the site with NVDA and it does list the link and not the graphic but I want to make sure that we are promoting compliance and best practices.

So, is the information above correct and if not, do you have any good suggestions for references for me?

Thanks,
H.

*Heather Mariger*
*Digital Accessibility Advocate*

*Pronouns: She/Her*

*Center for Academic Innovation*
*Chemeketa Community College*
*4000 Lancaster Drive NE - 9/126A*
*Salem, OR 97305*

503.589.7832

*****************
*Diversity is being invited to the party; inclusion is being asked to dance. * Verna Myers, author and speaker