Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.7 KB

File metadata and controls

36 lines (24 loc) · 1.7 KB

Links

Every link should make sense out of context, even if the link text is read by itself. Screen reader users may choose to read only the links on a web page when they're trying to navigate quickly.

Certain phrases like "click here" and "more" must be avoided. If we use phrases like 'click here' not only can it be confusing for those with screen readers (and repetitive, in some cases), we lose the attention of other visitors that are scanning our pages. By rewriting our links, we are helping all audiences!

Bad example:
Click here to learn more!

Good example:
Learn more about GitHub.

Learn more about <a href="http://www.github.com">GitHub</a>.

New Windows

When opening a link it is best to open it in the same window, or tab. Opening a link in a new window, also known as target="_blank", causes a few problems such as:

  • Screen reader users, and users with certain cognitive impairments can become disoriented when a new window is opened.
  • The back button, the most used button in the browser, is broken.
  • Some user agents, such as kiosks, can't open new windows, or tabs.

However, there are times where it is appropriate to open a link in a new window, such as opening a map application. If you must open a link in a new window, you should alert the user.

Bad example:
Learn more about GitHub.

Good example:
Learn more about Github (new window).

Learn more about <a href="http://www.github.com" target="_blank">GitHub (new window)</a>.

Return to the Best Practices homepage.