Ensure link text is meaningful within context - No accessible name for link

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

Accessible name from aria-labelledby is not blank. Should NOT be flagged.

* title attribute is in use

Accessible name from aria-labelledby is blank. 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.

Accessible name from aria-label. Should NOT be flagged.

* title attribute is in use

Accessible name from aria-label is blank. 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)

Accessible name from element text. Should NOT be flagged.

Voodoo Doll
Voodo oDoll
Voodoo * title attribute is in use

No Accessible name at all. SHOULD be flagged.

* title attribute is in use

Otherwise use the title attribute as the accessible name

Accessible name from title attribute. Should NOT be flagged.

Again no accessible name, even from title attribute. SHOULD be flagged.

Image link example

An example of a link that has an image with no alt tag. This element should be flagged by the BP: "Ensure link text is meaningful within context" AND NOT by the BP: "Provide alternative text for images"