Deepcrawl is now Lumar. Read more.
DeepcrawlはLumarになりました。 詳細はこちら

Identical anchor target and link text (WCAG Level AAA Issue)

How to fix the web accessibility issue of identical anchor target and link text appearing multiple times on a page — Lumar Web Accessibility Wiki

Semantics - Lumar Accessibility Thumbnail
 

What does this accessibility issue mean?

Issue summary: Identical anchor target and link text

Links on a webpage should have unique text content, particularly if pointing to the same URL. 

Having identical link anchor targets and text combinations appear multiple times on a page can cause confusion for users who rely on assistive technologies such as screen readers when trying to distinguish between different links. 

Solution:

Ensure that links with the same accessible name serve a similar purpose.

Issue details

Lumar can help you find & resolve this website accessibility issue — & many others — on your own site. Speak to our team to get started with the platform.

Get a Lumar demo

 

Example HTML violation: Identical anchor target and link text (WCAG Level AAA Issue)

<a href="/contact_us">Contact</a>
<a href="/contact_us_new">Contact</a>
 

Explanation: The above HTML violates the identical-links-same-purpose accessibility rule because it contains two links with the same accessible name, "Contact", that lead to different web pages. This can cause confusion for users who rely on screen readers or other assistive technologies to navigate the website.

 

How to fix the issue of identical anchor target and link text (WCAG Level AAA)

<a href="/contact_us">Contact Us</a>
<a href="/contact_us">Contact Us New Menu</a>

In the corrected code, I renamed the second link to indicate that it leads to a different resource i.e., a new menu on the Contact us page. Remember, the primary purpose of this rule aims to ensure that links or buttons that have the same accessible name or text alternative are used consistently across web pages and lead to the same resource.

 
Digital Accessibility + SEO + Website Health

Build better online experiences — explore the full Lumar platform