Accessible Clickable Card options

Cards can be challenging to make accessible. Designers often want the entire card to be clickable, but this can create accessibility issues.

The examples below show different ways to make cards interactive.

Each card contains a container, an image, an <h3> heading and a short paragraph.

Method 1: Just the default – users click the link in the heading

No extra markup or scripting. The only interactive element is the link inside the heading.

Laughing kookaburra

Known for its distinctive call, this large kingfisher is native to eastern Australia.

Accessibility features

Possible issues

HTML
<div class="card">
  <img src="https://placehold.co/300x120" alt="">
  <h3><a href="#">Laughing kookaburra</a></h3>
  <p>Known for its distinctive call, this large kingfisher is native to eastern Australia.</p>
</div>

Recommended: The simplest and most reliable option. Uses standard HTML and needs no JavaScript. The main downside is the small clickable area.

Method 2: A single link with no separate heading link

The entire card is wrapped in a single link. The heading is plain text, not a separate link.

Tasmanian devil

The world's largest carnivorous marsupial, now found in the wild only on the island of Tasmania.

Accessibility features

Possible issues

HTML
<a class="card-single-link" href="#">
  <div class="card">
    <img src="https://placehold.co/300x120" alt="">
    <h3>Tasmanian devil</h3>
    <p>The world's largest carnivorous marsupial, now found in the wild only on the island of Tasmania.</p>
  </div>
</a>

Recommended: A good option for cards with a single destination. Valid HTML, one tab stop, a large click target and standard link behaviour, with no JavaScript.

Method 3: CSS used to expand the link to cover the card

Only the heading contains a link. CSS uses an absolutely positioned ::after pseudo-element to extend the clickable area across the whole card. This is sometimes called the "stretched link" pattern.

Emu

The emu is the second-tallest living bird after its ratite relative, the ostrich.

Accessibility features

Possible issues

HTML
<div class="card card-css-expand">
  <img src="https://placehold.co/300x120" alt="">
  <h3><a href="#">Emu</a></h3>
  <p>The emu is the second-tallest living bird after its ratite relative, the ostrich.</p>
</div>

Recommended: A good option when you want to keep the heading as the link while making the whole card clickable. No JavaScript required, but care is needed when adding other interactive elements.

Method 4: A non-link element with a click handler (fake button/link)

The card uses JavaScript to behave like a link, without using a real <a> element. Additional code is needed to support keyboard and screen reader users.

Quokka

A small wallaby often described as "the world's happiest animal" because of its friendly expression.

Accessibility features

Possible issues

HTML
<div class="card card-fake-button" id="js-card-2" tabindex="0" role="link">
  <img src="https://placehold.co/300x120" alt="">
  <h3>Quokka</h3>
  <p>A small wallaby often described as "the world's happiest animal" because of its friendly expression.</p>
</div>

Do not use: This approach requires extra code and testing, loses native link features and depends on JavaScript. Use a real <a href> instead.

Method 5: JavaScript finds the link and makes the whole card clickable

The heading contains a real link. JavaScript listens for clicks anywhere on the card and follows the heading link, unless the user clicks another interactive element.

Wombat

This large, stocky marsupial is found in Australia and on scattered nearby islands.

Accessibility features

Possible issues

HTML
<div class="card card-js">
  <img src="https://placehold.co/300x120" alt="">
  <h3><a href="#">Wombat</a></h3>
  <p>This large, stocky marsupial is found in Australia and on scattered nearby islands.</p>
</div>
JavaScript
document.querySelectorAll('.card-js').forEach(function (card) {
  var link = card.querySelector('h3 a');
  if (!link) return;

  card.addEventListener('click', function (event) {
    // Let clicks on real interactive elements behave normally
    if (event.target.closest('a, button, input, select, textarea')) return;

    // Don't navigate if the user is selecting text
    var selection = window.getSelection();
    if (selection && selection.toString().length > 0) return;

    link.click();
  });
});

Recommended: A good option when JavaScript is needed. It extends the clickable area without replacing the real link. Standard keyboard and screen reader behaviour is preserved, and the link still works if JavaScript fails.