Ensure the same link text for links with different targets is avoided

To test with this page, view the page source and look at the comments. The comments will not show up in the devtools for some browsers so please use the view source feature for whatever browser you are using.

Use aria-labelledby. Use the text from each ID referenced element in the order the ids are listed and return that.

123 456 789

123

456

789

Same link text, same target. Should NOT be flagged.

* title attribute is in use

zombie midnight blood

zombie

midnight

blood

Same link text, different targets. SHOULD be flagged.

* title attribute is in use

Otherwise if aria-label is a non-empty string when trimmed use the value of the aria-label.

Same link text, same target. Should NOT be flagged.

* title attribute is in use

Same link text, different targets. SHOULD be flagged.

* title attribute is in use

Otherwise if element subtree is a non-empty string when trimmed use a element subtree (e.g. the actual text of the link)

Same link text, same target. Should NOT be flagged.

Voodoo Doll
Voodo oDoll
Voodoo * title attribute is in use

Same link text, different targets. SHOULD be flagged.

Voodoo Doll5
Voodoo Doll5
Voodoo * title attribute is in use

Otherwise use the title attribute as the accessible name

Same link text, same target. Should NOT be flagged.

* title attribute is the only method used for link text

Same link text, different targets. SHOULD be flagged.

* title attribute is the only method used for link text

Relative versus absolute URLs

Same link text, same targets. Should NOT be flagged.

Contact Us
Contact Us

Same link text, different targets. SHOULD be flagged.

Make it happen
Make it happen

Links with no hrefs

Same link text, no targets. Should NOT be flagged.

no href here no href here