Images Linking to Self

Images Linking to Self

WCAG Focus: WCAG 2.4.4 (A), 2.1.1 (A)

Older WordPress editor defaults frequently wrapped uploaded post images in <a href="/wp-content/uploads/photo.jpg"><img src="/wp-content/uploads/photo.jpg" …></a>. Clicking the image dumps visitors onto a bare browser image tab with no site navigation, no skip links, and no context.

Why This Pattern Violates WCAG

WCAG 2.4.4 Link Purpose (Level A) and navigation consistency are compromised when an image acts as an unexpected link to itself without announcing that it opens a raw media file.

Keyboard users tab through unnecessary links only to land on an isolated image URL.

Code Comparison

Unnecessary Self-Linking Image

<a href="/wp-content/uploads/diagram.png">
  <img src="/wp-content/uploads/diagram.png" alt="Site architecture diagram">
</a>

Clean Non-Linked Image

<img src="/wp-content/uploads/diagram.png" alt="Site architecture diagram">

How to Fix It in WordPress

  • Set WordPress Image Block link settings to "None" unless an enlarged view is genuinely required.
  • If users need a larger zoom view, use an accessible lightbox dialog with clear link text.

Finding This Issue Automatically

Imported and older WordPress articles often retain self-linking media URLs from classic editor defaults. The WP ADA Compliance Check plugin scans for images linking directly to themselves and will automatically fix the issue by removing links from images that are linked to themselves.

WCAG References & Supporting Materials

WCAG Success Criteria

Supporting Documentation & Guides

Subscribe

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

Cart Accessibility Tools
hide