Back to Learn
Pulseaccessibility

role=text Elements Don't Have Focusable Children

What This Audit Checks

This audit verifies that elements with role="text" do not contain focusable children like links or buttons. The role="text" tells screen readers to treat the entire subtree as a single text string, but focusable children inside it create a contradiction.

Why It Matters

When a screen reader encounters role="text", it reads the content as one continuous string. But if a link or button is nested inside, keyboard users can still focus it -- yet the screen reader may not announce it as a separate interactive element, making it invisible or confusing.

How to Fix It

  • Remove role="text" if the element contains interactive children. Let the natural DOM structure handle the reading order.
  • Move interactive elements outside the role="text" container if you need the text grouping behavior.
  • Restructure the markup so that text and interactive elements are siblings, not nested.
<!-- Bad: focusable link inside role="text" -->
<span role="text">
  Read our <a href="/terms">terms of service</a> before continuing.
</span>

<!-- Good: remove role="text" to preserve link semantics -->
<span>
  Read our <a href="/terms">terms of service</a> before continuing.
</span>

How Pulse Tracks This

Pulse flags this audit in your Lighthouse accessibility score. When the audit fails, Pulse shows which elements triggered it so you can fix them directly.

Resources