# ARIA Text

> Elements with role=text should not contain focusable elements. The role flattens content into plain text, hiding the roles, names, and states of the controls.

Source: https://knowledge.evinced.com/web/web-validations/aria-text

`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"`.

```html
<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.

```html
<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"`.

```html
<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"`.

```html
<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](https://knowledge.evinced.com/a11y-essentials/practical-guides-for-using-screen-readers)

1.  Load the page and turn on a screen reader.
2.  Press Tab until a link or button inside the element with `role="text"` receives focus.
3.  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

1.  Open your browser's developer tools.
2.  In the **Elements** panel press **Ctrl + F** (or **⌘ + F**) and search for `role="text"`.
3.  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.

## Standards and Regulations

This issue is classified as "**Best Practice**," meaning it isn't tied to a specific WCAG success criterion or any other regulation or standard; however it still affects the experience of some users. These issues fall outside formal compliance requirements, yet addressing them improves usability and accessibility in practice.

## Personas impacted by this issue

-   [Screen Reader](https://knowledge.evinced.com/a11y-essentials/personas#screen-reader)
-   [Braille](https://knowledge.evinced.com/a11y-essentials/personas#braille)
-   [Keyboard](https://knowledge.evinced.com/a11y-essentials/personas#keyboard)
-   [Voice Input](https://knowledge.evinced.com/a11y-essentials/personas#voice-input)

## Related Issues

-   [aria-hidden-focus](https://knowledge.evinced.com/web/web-validations/aria-hidden-focus)
-   [nested-interactive](https://knowledge.evinced.com/web/web-validations/nested-interactive)
