WebAIM - Web Accessibility In Mind

E-mail List Archives

H30's testing procedure


From: Mark Weiler
Date: Jun 29, 2017 11:07PM

Hoping someone can help me out.  Am I correct about this?
I'm doing a close reading of the testing procedures for H30.  They don't seem to contemplate the situation where there is an image with alt text and text in the link. As a result, it can't seem to detect a problem where neither the image's alt attribute nor the link text describes the purpose of the anchor.  Consider the the following piece of HTML: 

<a href="cat.jpg"><img alt="a bird in a cage">my dog Murphy</a>
Test procedure and results:
1. Check that text or a text alternative for non-text content is included in the anchor element.True.

2. If an image element is the only content of the anchor element, check that its text alternative describes the purpose of the link.This test doesn't apply because text accompanies the image.

3. If the anchor element contains one or more image element(s) and the text alternative of the image element(s) is empty, check that the text of the link describes the purpose of the link This test doesn't apply because the text alternative for the image isn't empty.

4. If the anchor element only contains text, check that the text describes the purpose of the link
This test doesn't apply because an image accompanies the text