Skip to content
SilktideHelp

Adjacent links

Silktide finds pairs of links that sit right next to each other and point to the same destination. These duplicates should almost always be combined into a single link.

The most common pattern is an image link followed by a text link to the same page:

<!-- Problem: two separate links to the same destination -->
<a href="news.html">
    <img src="photo.jpg" alt="">
</a>
<a href="news.html">
    News
</a>

<!-- Fixed: one combined link -->
<a href="news.html">
    <img src="photo.jpg" alt="">
    News
</a>

Why this matters

Many people experience a page sequentially - a keyboard user tabs through every link in turn, and a user hears each link announced. Duplicate adjacent links double that work for no benefit: the same destination is announced twice, link lists fill with repeats, and an image link with empty next to its text twin can be announced with no name at all, which is confusing.

Combining the pair into one link gives everyone a single, clearly named target, and simplifies your .

How to fix it

  1. Move the image and text inside a single <a> element, as in the example above.
  2. Give the image inside the combined link an empty alt="", since the text beside it already names the destination - see Duplicate alt text.
  3. If your or theme generates the duplicate links (common in news listings and card layouts), fix the template once to resolve every instance.

How Silktide tests this

  1. Find all links on each page.
  2. Ignore links pointing to #, which are nearly always placeholders for , and links that cannot receive , which are not exposed as links to .
  3. For each link, look at what immediately follows it. If anything other than whitespace separates the two links, they are not adjacent and are not reported.
  4. Report the pair when the next link resolves to the same absolute URL.

Troubleshooting

Links that share a URL but run different JavaScript are not reported when the difference is visible in their onclick attributes. If a pair behaves differently in a way Silktide cannot see, you can the finding - but consider whether the distinction is equally invisible to your visitors.

Adjacency is measured in the page's code, not on screen. Two links can appear far apart after styling yet still be adjacent in the HTML - and assistive technology reads the HTML order, so the duplication is real for those users.

Learn more

Last updated

Was this page helpful?

Adjacent links | Silktide Help