Skip to content
easeweb
Search topics

Banner and image links with no name

A promo banner is made clickable with a link that holds only its photo, marked as decoration, or with an empty link laid over it, so the link has no name and a screen reader can say only "link" or its address.

Passes when
Links say where they go
WCAG 2.2
SC 2.4.4A
Required by
Section 508 · EN 301 549 (EU)
Broken <a href="/collections/autumn-roasts" class="banner-link"><img src="/images/autumn-roasts.jpg" alt=""></a>
The accessibility problem illustrated: No vision:Where does this link go?
01

The problem

Screen reader users reach a banner link that says nothing, so they can't tell where it goes before they follow it.

02

Try it

Press Tab to reach the banner’s link, then try the simulated voice control.

The panel shows what a screen reader announces for the link, and its list of links. Does the banner’s link say where it goes, and does saying the words on its pill reach it?

Broken Can you fix this?

Autumn roasts are here

Three new single-origin beans, roasted this week.

Shop the roasts
Voice control (simulated):

Screen reader says:

(Tab to a link)

Its list of links:

  1. (no name) collections/autumn-roasts

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give the banner's link the words on its pill: in the link you have, or by making the pill the link.

  1. 1Every link needs words: its text, an image's alt, or a name from aria-labelledby.
  2. 2Name the link laid over a banner after its pill, or make the pill the link, stretched by a pseudo-element.
  3. 3Name an image or icon link after where it goes, not after the picture.
Before

The photo as the link, marked as decoration

<div class="banner">  <a href="/collections/autumn-roasts" class="banner-link">    <img src="/images/autumn-roasts.jpg" alt="">  </a>  <div class="banner-text">    <h2>Autumn roasts are here</h2>    <p>Three new single-origin beans, roasted this week.</p>    <span class="banner-cta">Shop the roasts<span aria-hidden="true"> →</span></span>  </div></div>
After

Add the pill's words to the link you have

<div class="banner">  <a href="/collections/autumn-roasts" class="banner-link">    <img src="/images/autumn-roasts.jpg" alt="">    <span class="visually-hidden">Shop the roasts</span>  </a>  <div class="banner-text">    <h2>Autumn roasts are here</h2>    <p>Three new single-origin beans, roasted this week.</p>    <span class="banner-cta">Shop the roasts<span aria-hidden="true"> →</span></span>  </div></div>

Fixing this with an AI coding assistant? Get this guide as Markdown, or get every guide in your coding agent.

04

Verify the fix

5 checks.

Test with: Keyboard, Screen reader, Speech input, Mouse

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared banner or slideshow component changes.

Limits

This is a starting pattern, not a guarantee for every application. Paths and class names in the snippets are placeholders. Content editors can still leave a banner's pill text empty later, so keep link names in your publishing review. Test the complete journey with your target assistive technology.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work