r/HTML • • Oct 20 '26

Accessible hyperlinks?

Hey folks!

I am hand coding a series of webpages for my employer (don't ask). I just got dinged because the accessibility checker says my hyperlinks are not accessible.

I scratched my head a little bit, did some research and have since added aria-label attributes to the source code.

Still get dinged.

Anyone know how to handle this?

Thanks!

Edit: Here is more or less an example of the code that includes the link.

2 Upvotes

20 comments sorted by

View all comments

2

u/lyszcz013 Oct 20 '26

What specific error are you getting? It's difficult to know if this is a false positive or what the issue is without seeing an example or what specific violation your checker is finding.

That being said, while aria-label does have its uses, that should be the last resort for hyperlink accessibility.

Off the top of my head, here are a few things to consider:

  1. Your link text should be descriptive of the destination of the link, and should not be generic, ambiguous, or a url. So, no "click here's" or "https://mysuperlongurl.hyperlink.194736.com"
  2. Your hyperlinks need to be visually distinguishable when used in body copy. In practice, this usually means making sure underline is present on your links at all time (and reserving underline for links only). Color alone is not enough to visually distinguish links, there must be a non-color differentiator as well.
  3. If you've used aria-label to override the link descriptive text, the actual visual link text must be present in the aria label, preferably listed first. This is necessary to accommodate users using voice control who may read the visible label to activate your link.