Elements with role="text" must not contain focusable content

role="text" makes screen readers read an element as one plain run of text. A link or button inside it loses its role and may become unreachable. This is a best practice, not a WCAG requirement.

Rule IDaria-text
ImpactSerious
Success criterion Best practice, not a WCAG requirement
Readabler fix Needs a change in the website’s code

Example

Before
<p>
  <span role="text">Free delivery on orders over €50. <a href="/delivery">See conditions</a></span>
</p>

VoiceOver reads the sentence as plain text; “See conditions” is not announced as a link.

After
<p>
  <span role="text">Free delivery on orders over €50.</span> <a href="/delivery">See conditions</a>
</p>

VoiceOver reads the sentence, then announces “See conditions, link”, which users can activate.

Why it matters

role="text" is not part of the ARIA standard, but VoiceOver on Apple devices supports it. Developers use it to stop VoiceOver from splitting a phrase like a price with mixed formatting into several fragments. To do that, the screen reader treats every child as plain text.

That is harmless for spans and bold words, but not for interactive elements. A link or button inside loses its role: blind VoiceOver users do not hear that it is clickable, may not be able to reach it by swiping, and still land on it with the Tab key without knowing what it is. Keyboard users with sight are not affected, which makes the bug easy to overlook. This is a best practice, not a WCAG requirement, but the effect on screen reader users is real.

How to fix it

Move interactive elements out. Wrap only the text you want read as a single unit, and keep links, buttons and form fields outside:

<span role="text">
  Now <s>€89</s> <strong>€59</strong>
</span>
<button type="button">Add to basket</button>

Make sure the text still reads well. Because content inside is flattened, add a visually hidden word where the formatting carried meaning, such as “was” and “now” around a crossed-out price.

Consider removing the role. It is not standard and only helps on Apple platforms. Other screen readers ignore it. If fragmented reading is a minor annoyance, plain markup may be the safer option.

Hidden focusable children. If the focusable element must stay inside and is meant to be hidden, hide it properly with hidden or display: none, not with aria-hidden alone, so it also leaves the tab order.

Checklist

  1. Wrap only plain text in role="text".
  2. Keep links, buttons and form fields outside the wrapper.
  3. Add hidden words where flattened formatting loses meaning.
  4. Drop the role when it is not clearly needed.

How the check works

The check looks at every element with role="text". It passes when the element has no focusable descendants with a widget role, such as links, buttons or form controls. It fails when it finds one, and it points out focusable children that are hidden only with a method that leaves them reachable by keyboard.

Resources

Updated October 27, 2026