Adjacent Anchor Tags With the Same Link Text

Adjacent Anchor Tags With the Same Link Text

WCAG Focus: WCAG 2.4.4 (A) · Technique H2

WordPress blog grids and WooCommerce product cards very often output two separate <a> tags side by side pointing to the exact same post URL: one wrapping the featured image (whose alt text repeats the post title) and a second wrapping the heading immediately below.

Why This Pattern Violates WCAG

WCAG Technique H2 (Combining adjacent image and text links for the same resource) addresses this exact redundancy.

Separate adjacent links force keyboard users to press Tab twice for every card and cause screen readers to announce the exact same title back-to-back.

Code Comparison

Inaccessible Duplicate Card Links

<a href="/post-url/"><img src="thumb.jpg" alt="Accessibility Checklist"></a>
<h3><a href="/post-url/">Accessibility Checklist</a></h3>

Compliant Combined Link or Decorative Image

<a href="/post-url/">
  <img src="thumb.jpg" alt="">
  <span>Accessibility Checklist</span>
</a>

How to Fix It in WordPress

  • Combine the featured image and title inside a single <a> element, or keep the image decorative (alt="") if the heading link immediately follows.
  • Ensure the visual card maintains a clear focus outline across the unified link.

Finding This Issue Automatically

Loop templates and Elementor icon/image box widgets produce adjacent duplicate links automatically on archive and landing pages. The WP ADA Compliance Check plugin flags adjacent identical links across your site and automatically fixes adjacent identical links created by Elementor icon and image box widgets.

Subscribe

Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

Cart Accessibility Tools
hide