Skip to content

H2: fix the contradictory test procedure - #5485

Open
zaccesss wants to merge 2 commits into
w3c:mainfrom
zaccesss:fix/h2-test-procedure
Open

zaccesss wants to merge 2 commits into
w3c:mainfrom
zaccesss:fix/h2-test-procedure

Conversation

@zaccesss

@zaccesss zaccesss commented Dec 5, 2026

Copy link
Copy Markdown

Closes #1694.

The two steps of the test procedure in H2 contradict each other. Step 1 requires every img in the link to have a null alt. Step 2 allows a null alt or one that supplements the link text. The technique's own second example has a non-empty alt, so it fails step 1.

This uses the wording @awkawk proposed in the issue, which nobody objected to. It is split into two commits so that either can be dropped.

Commit 1: the procedure and two typos

  • The procedure becomes:
    1. Check that the combined text from the a element and the alt attribute values from img elements contained in the a element clearly identifies the target of the link.
    2. Check that adjacent links do not go to the same target.
  • In the description, "This objective of this technique" becomes "The objective of this technique".
  • In the description, "Since different users finding text and icons more usable" becomes "Since different users find text and icons more usable".

Commit 2: the second example

The thread disagreed on whether "home page icon" with "Go to the home page" is a good example. This replaces it with the one suggested in the same comment: a download link whose icon has a text alternative for the file type. The only difference from the suggestion is that the format name is written "EPUB", its official spelling.

<a href="book2.epub">
  Download Book 2 <img src="epub.gif" alt="EPUB">
</a>

If the group would rather keep the current example, I can remove the second commit.

cspell passes on the file.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant