When two links share the same parent element, have identical visible text, but point to different destinations, screen readers and assistive technologies that list all links on a page will present the user with two indistinguishable entries leading to different places.
This specific situation—same-text links that are siblings in the same container—is the one case where context cannot disambiguate the purpose of
each link. Links in separate containers (different <article>, <li>, <div>, or other elements)
are intentionally not flagged: WCAG 2.4.4 explicitly allows identical link text when the surrounding context (for example, the enclosing list item or
table row) provides disambiguation.
<div> <a href="/user/1/edit">Edit</a> <!-- Noncompliant; same text, different targets, same parent --> <a href="/user/2/edit">Edit</a> </div>
<!-- Different containers: context disambiguates each link --> <article><h2>First post</h2><p>…</p><a href="/posts/1">Read more</a></article> <article><h2>Second post</h2><p>…</p><a href="/posts/2">Read more</a></article> <!-- Same container, but with distinct text --> <div> <a href="/user/1/edit">Edit Alice</a> <a href="/user/2/edit">Edit Bob</a> </div> <!-- Same container, same text, same target --> <div> <a href="/help">Help</a> <a href="/help">Help</a> </div>