Skip to content

Test procedure for Technique H2 may have a typo that makes it invalid #1694

Open

Description

@mraccess77

The Procedure says
For each a applying this technique:

Check that every img element contained within the a element has a null value set for its alt attribute.

Check that the a element contains an img element that has either a null alt attribute value or a value that supplements the link text and describes the image

This seem contradictory. This test need to be updated to make the intent more clear.

https://www.w3.org/TR/WCAG20-TECHS/H2.html

Activity

  1. JAWS-test commented on Mar 23, 2021

    @JAWS-test

    The first check could be removed.
    Alternatively, the first part of the second check could be removed and both checks could be connected not with an AND but with an OR

    Perhaps another check should be added, derived from the description of H2: Check that a link consisting of text and icon does not consist of two separate links in the source code (however, there seems to be no SC that explicitly prohibits this)..

    Also, I would design example 2 better, because an output of "home page icon Go to the home page" is not useful (and possibly violates SC 2.4.6)

  2. mraccess77 commented on Mar 23, 2021

    @mraccess77
    Author

    Hi @JAWS-test I agree with your your suggestions for changing the wording - although I don't understand the comment about the image link for the home page. Any logo type link that also goes to a home page needs to communicate the image logo alternative and also the purpose of the link - goes to home page. I believe that is what is trying to be communicated.

  3. JAWS-test commented on Mar 23, 2021

    @JAWS-test

    Any logo type link that also goes to a home page needs to communicate the image logo alternative and also the purpose of the link - goes to home page.

    If graphics and link target are both important, the example is ok. However, I think that mostly the link target is important rather than the graphic. This also refers to SC 1.1.1:

    If non-text content is a control ... , then it has a name that describes its purpose

    i.e. in the case of a graphical control, it is not the graphic that must be described, but the purpose of the control. Of course, this may be different for the logo of the page. Nonetheless, "Home page" would be sufficient as a link label. Both the "Go to the" for a link and the "Icon" for a graphic are superfluous.

  4. mraccess77 commented on Mar 23, 2021

    @mraccess77
    Author

    I believe an equivalent of the graphic is needed - not just the purpose of the link as they may or may not be the same. In terms of just stating home page - while I typically agree go to is extra verbosity - there could be confusion on if this current page is actually the home page or the link goes to the home page. That is what that wording was trying to make clear. The graphic link is serving two purposes - 1 to communicate something about the current page's author and 2 what the link does.

  5. awkawk commented on Mar 23, 2021

    @awkawk
    Member

    How about:

    For each a applying this technique:

    • Check that the combined text from the a element and alt attribute values from img elements contained in the a element clearly identifies the target of the link.
    • Check that adjacent links do not go to the same target.

    I think that example 2 is not great. I'd rather have:
    A link contains an icon and text to indicate a book title to download and what file type the downloaded file is. The img has a text alternative which indicates the file type.

    <a href="book2.epub">
    Download Book 2  <img src="epub.gif" alt="EPub">
    </a> 
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions