WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Duplicate linkage

for

From: Jared Smith
Date: Sep 1, 2009 8:50AM


On Tue, Sep 1, 2009 at 8:33 AM, Steven Henderson wrote:

> Why do so many websites still place an additional link underneath the
> heading link for the image, linking to the same page as the heading link?

Either ignorance or they're using a content management system that
doesn't know better. And most often, the image does not have
alternative text, resulting in an empty link. When a screen reader
encounters a link that contains only an image that does not have
alternative text, it will read the URL of the link and/or the image
file name, which may or (most often) may not be useful.

> Is there really a
> disadvantage to placing the image inside the h2 tag, thus sharing the same a
> tag?

No. But often these sites are using tables or other complexities to
control layout making it difficult for them to place both the text
'caption' and the image within the same link. This is easily resolved
through some very basic CSS.

> <h2><a href="http://www.website.com/blue.html">Best blue product <img
> src="products/blue.jpg" alt="" /></a></h2>

Yep, this is the best way to code it to avoid any redundancy or empty
links. This assumes that the product really should be within an <h2>
in this context (most product listing probably wouldn't justify
headings for every single product).

Jared Smith
WebAIM