W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2012

RE: Anchor images - pixel sized & alt text

From: Steve Green <steve.green@testpartners.co.uk>
Date: Tue, 10 Jul 2012 17:53:25 +0000
To: PJ Mancuso <pmancuso@uoguelph.ca>, Philippe Vayssière <philippe@alsacreations.fr>
CC: "w3c-wai-ig@w3.org" <w3c-wai-ig@w3.org>
Message-ID: <6BDDA23E03987E4C90F4F8B4127D3B7A14551C0F@THHSLE14MBX3.hslive.net>
The code is fine as it is. The text inside the <a> element is specifying the link destination, so the image just needs a null 'alt' attribute, which it has.

If there was no text, the image would need a descriptive 'alt' attribute.

Steve Green

From: PJ Mancuso [mailto:pmancuso@uoguelph.ca]
Sent: 10 July 2012 18:44
To: Philippe Vayssière
Cc: w3c-wai-ig@w3.org
Subject: Re: Anchor images - pixel sized & alt text

Here is a snippet of one of them, it does appear to be a link:

<span class="d_nb_ni">
<a href="/d2l/lp/ouHome/defaultHome.d2l">
<img src="/d2l/img/lp/pixel.gif" class="d_nb_s" alt="" />
<span>My Home</span>

But like I said the image is 1px, should alt be filled or should the programmers figure out a diff way for styling content?


On Tue, Jul 10, 2012 at 12:31 PM, Philippe Vayssière <philippe@alsacreations.fr<mailto:philippe@alsacreations.fr>> wrote:

Could you please provide the HTML code of the enclosing link?
Is this a named anchor :
    <a name="name_attribute_deprecated_but_still_used"
id="name_attribute_deprecated_but_still_used"><img src="path/image.png"
or a link to some page :
    <a href="something.php"><img src="path/image.png" alt=""></a>

For example, the Accessiweb checklist, which is based on WCAG 2.0,
excludes "a" elements without an "href" attribute from the links that
should have text (or alternative text) as content :
(you can follow links to the glossary for more details).

Ph. Vayssière

Le 10/07/2012 17:39, PJ Mancuso a écrit :
> Hi everyone,
> Wanted to say thanks for the previous help received and that I have
> been making headway auditing the webpages that have been tasked to me.
> Question about anchor images and alt text. I received this as some of
> the known problems:
> *Success Criteria 1.1.1 Non-text Content (A)*
> Check 7: Image used as anchor is missing valid Alt text.
> <http://achecker.ca/checker/suggestion.php?id=7>
> *Repair: *Add Alt text that identifies the purpose or function of the
> image.
> /Line 84, Column 13/:
> <img src="/jjj/img/lp/pixel.gif" class="d_nb_s" alt="" />
> The image itself is 1px and is used as an anchor for a link I believe.
> In this situation is alt text really useful? I have read somewhere
> that in this particular situation anchor images shouldn't even be
> used. What exactly is the proper procedure here?
> Any explanation would be greatly appreciated so I can pass on to the
> programmers. I hope this wasn't too confusing.
> Regards,
> -PJ
Received on Tuesday, 10 July 2012 17:53:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:45 UTC