WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: H30's testing procedure

for

Number of posts in this thread: 2 (In chronological order)

From: Mark Weiler
Date: Thu, Jun 29 2017 11:07PM
Subject: H30's testing procedure
No previous message | Next message →

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

From: Tim Harshbarger
Date: Fri, Jun 30 2017 6:43AM
Subject: Re: H30's testing procedure
← Previous message | No next message

I agree. You are correct that the test does not cover the situation you mention. However, keep in mind that the test is only intended to apply to the techniques that are described in the same document. If you use one of those listed techniques correctly, it should pass. If you use one of those techniques incorrectly, it should fail.

I don't believe the situation you mention is covered by any of the listed techniques. The one that comes closest is the situation where the link text describes purpose and an image provides additional information (such as the link opens in a new tab or opens an Excel or PDF file.)

Since the technique you mention isn't listed in H30, I think you would then default to basing your test criteria on the associated success criterion for 2.4.4 (Link Purpose.)

You might also consider submitting this information to the W3C-WAI as a technique and test that might be added to H30 in the future.

I expect most people take the stance that if the link text describes the link purpose, the image alt text should be null. However, I personally would find it difficult to justify that providing both an image alt text and link text that describe the purpose as not conforming with 2.4.4. Sure, I might classify this as what we call a TMI (Too Much Information) issue where someone using a screen reader might have to listen to redundant information, but I class that more as a usability issue than an issue that blocks access. However, that is just my personal opinion.

Thanks,
Tim