Interactive controls must not contain other focusable controls

Do not put a link, button or other focusable element inside a control whose content is read as plain text, such as a button, tab, checkbox or option. The inner control is often not announced and confuses focus.

Rule IDnested-interactive
ImpactSerious
Success criterion 4.1.2 Name, Role, Value · A
StandardsWCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549
Readabler fix Needs a change in the website’s code

Example

Before
<button class="product-card">
  <img src="kettle.jpg" alt="">
  Steel kettle, 1.7 l
  <a href="/kettle/reviews">Read reviews</a>
</button>

A screen reader announces one button. The Read reviews link inside it is not announced as a link.

After
<div class="product-card">
  <img src="kettle.jpg" alt="">
  <button type="button">Steel kettle, 1.7 l</button>
  <a href="/kettle/reviews">Read reviews</a>
</div>

A screen reader announces a button and a separate link, and each has its own Tab stop.

Why it matters

Some roles flatten their content. For a button, tab, checkbox, radio, switch or listbox option, assistive technology presents everything inside as one plain label. A link placed inside loses its role: a blind user hears "Steel kettle, 1.7 l Read reviews, button" and has no idea there is a separate link to follow.

Keyboard users get a different problem. Browsers handle the nesting inconsistently: some give the inner control its own Tab stop with nothing to show for it, others skip it, and pressing Enter may trigger the outer control, the inner one, or both.

Voice control users cannot target the inner control by name either. The HTML specification also forbids interactive content inside <button> and <a>, so browsers may repair the markup in unexpected ways.

How to fix it

Put the controls next to each other instead of inside one another.

Clickable card. Make the main link the only control around the title, and stretch its click area over the card with CSS. Other controls stay siblings:

<article class="card">
  <h3><a href="/kettle" class="card-link">Steel kettle, 1.7 l</a></h3>
  <p>£29.00</p>
  <button type="button" class="add">Add to basket</button>
</article>
<style>
  .card { position: relative; }
  .card-link::after { content: ""; position: absolute; inset: 0; }
  .add { position: relative; z-index: 1; }
</style>

Tabs with a close button. Place the close button after the tab element, not inside it, and give it a name such as "Close Invoices tab".

Options with actions, like a delete icon in each list option: move the action outside the listbox, or use a grid pattern that is designed for several controls per row.

Purely decorative inner element that happens to have tabindex: remove the tabindex.

Checklist

  1. Never put links or buttons inside a button or link.
  2. Build clickable cards with one stretched link.
  3. Place secondary actions beside the main control.
  4. Remove tabindex from decorative children of controls.

How the check works

The check looks at elements whose role makes their content presentational, such as button, tab, checkbox, radio, switch, option, menuitemcheckbox and slider. It fails when one of them contains a focusable descendant, including elements with tabindex="0". Descendants hidden in an unreliable way, for example with aria-hidden while still focusable, are pointed out separately. It passes when there are no focusable descendants.

Resources

Updated October 27, 2026