Below are some best practices for writing accessible, usable links.
Use clear, concise link wording.
Clearly indicate the link destination. Let visitors know where you’re taking them.
-
- Good: Learn more about our building blocks.
- Bad: To learn more about our building blocks, click here.
Don’t repeat the URL as part of the link text.
URLs look ugly, and sound even uglier when a screen reader reads them out letter by letter.
Don’t say “link” or “links to” in the link text.
It’s just noise. Screen readers tell people there’s a link. Visual users will know there’s a link because links are generally styled in a different color.
Keep your link label as short as possible.
Long links especially annoy screen reader users, who have to hear the whole thing read out.
Eliminate instances where multiple copies of the same text are linked to different places.
This can cause problems for screen reader users, who will often bring up a list of the links out of context.
Clearly word links that will trigger an atypical action.
Let your visitor know if the link will open a PDF or trigger a download or media stream.
- Good link text: Download the employment report. (PDF)
- Good link text: View the annual report. (PDF)
- Good link text: Watch the video. (Stream opens in separate tab, HD quality.)
Source: MDN Web Docs