aria-text
Web validation
role="text" should not contain focusable descendants.The role="text" attribute flattens an element and its children into plain text, so assistive technology treats them as one phrase. This hides roles, accessible names, and states from people using assistive technology.
Support for role="text" is inconsistent and being removed from accessibility specifications. In legacy code, focusable elements inside a container with this role can become silent tab stops, with their purpose hidden from assistive technology.
Pass Patterns
Line break inside a heading without role="text"
A heading element splits text across two lines without role="text".
<h1>Hello <br />World</h1>role="text" with no focusable descendants
The inline markup is wrapped in role="text" so it is read as one phrase. It contains no focusable elements, so no interactive semantics are hidden.
<p><span role="text">This plan includes <em>priority</em> support.</span></p>Fail Patterns
Link nested inside role="text"
A focusable element is nested inside an element with role="text".
<span role="text">
<a href="/site.html">Read more</a>
</span>Button nested inside role="text"
A button is nested inside an element with role="text".
<p role="text">
Save your changes
<button>Save</button>
</p>Try It Yourself
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Load the page and turn on a screen reader.
- Press Tab until a link or button inside the element with
role="text"receives focus. - Listen to what the screen reader announces.
Expected results: The screen reader announces the control’s name and role.
Actual results: The control may become a silent focus stop because role="text" hides its semantics.
Inspecting the browser dev-tools
- Open your browser's developer tools.
- In the Elements panel press Ctrl + F (or ⌘ + F) and search for
role="text". - For each match, check whether the element contains links, buttons, form fields, or nodes with
tabindex="0"or a positive value.
Expected results: The element has no focusable descendants, or role="text" is not present.
Actual results: A link, button, or other focusable element is nested inside the element with role="text", making it a silent tab stop.
FAQ
Why is this validation considered a best practice?
role="text" is non‑standard and hides semantics. Removing or avoiding it prevents invisible focus stops and keeps interactive elements accessible.
Why is this issue marked as Serious?
A silent focus stop blocks keyboard navigation and leaves screen‑reader users without context, causing a significant barrier across browsers and assistive technology.