ISSUE-435: Consider role="text" to expose elements (and contents) as static text node

role text

Consider role="text" to expose elements (and contents) as static text node

ARIA 1.1 Core Mapping Specification
Raised by:
James Craig
Opened on:
Proposed by Steve Faulkner in XTech thread "suggestions for new roles and properties in ARIA next"

> role="text"
> when a non text object has a role of text , its to be treated as text.
> example use:
> My <img src="heart.png" alt="heart" role="text"> breaks.
> provides a way convey an objects text alternative without exposing its role.

I second the idea, with the caveat that the example should probably use aria-label instead of the alt attr which is specific to the img role. - jc
Related Actions Items:
Related emails:
No related emails

Related notes:

I retract my caveat about not allowing @alt there. Here's the relevant part from the text alt computation (rule 2A bullet 3).

If aria-labelledby and aria-label are both empty or undefined, and if the element is not marked as presentational (role="presentation"), check for the presence of an equivalent host language attribute or element for associating a label, and use those mechanisms to determine a text alternative. For example, in HTML, the img element's alt attribute defines a label string and the label element references the form element it labels. See How to Specify Alternate Text ([HTML], section 13.8) and HTML 5 Requirements for providing text to act as an alternative for images([HTML5], section

James Craig, 21 Apr 2011, 00:07:12

Cyns thinks revisit naming.

James Craig, 23 Jan 2014, 20:18:21

The name 'text' may imply more functionality than this feature has. Please consider a different name.

Cynthia Shelly, 23 Jan 2014, 20:18:59

role="text" problem is same as with aria-hidden="false", if something is not rendered then it requires special support.

so if you have an image that represents bunch of text then the browser should implement API to navigate the text by lines, words, characters. Also the selection should be probably supported in some way, perhaps keyboard shortcuts like ctrl+c/etc as well.

What behavior is supposed to be if the role="text" is inside editable area and the user starts editing when he's inside role="text"?

On the another hand screen readers like Orca having no virtual buffer feature (relying on browser keyboard navigation) will be forced to implement vb. While I can see benefits of role="text" but it's implementation may be tricky for both browsers (Firefox) and screen readers (Orca)

Alexander Surkov, 23 Jan 2014, 23:01:30

As with any 1.1 role, back it up with a 1.0 role so that browsers that don’t recognize the new role will still work.

<p>I <span role="text img" aria-label="love">♥︎</span> New York.</p>
<p>My <span role="text img" aria-label="heart">♥︎</span> bleeds.</p>

On 1.1-capable browsers, you’d hear “I love New York” but on 1.0 capable browsers, you might hear “I, love image, New York."

It should not be necessary to use the fallback role if it’s the implicit role for the element, though you may need to duplicate the tag-specific label (like this case with @alt and @aria-label on <img>).

<p>I <img src="icon.gif" alt="love" role="text" aria-label="love"> New York.</p>
<p>My <img src="icon.gif" alt="heart" role="text" aria-label="heart"> bleeds.</p>

Debate is open as to whether the role-specific host language labeling mechanism (e.g. img@alt) should still apply when this is effectively no longer an image.

James Craig, 19 Feb 2014, 03:02:38

Include author errors when using on certain elements, and file HTML 5.1 bug for use with these elements. Include editorial note about "plaintext" or "statictext" name suggestions from Cyns and Clown.

James Craig, 24 Feb 2014, 19:08:29

Closing. Will handle in ACTION-1391.

James Craig, 24 Feb 2014, 19:15:53

Also this example:
<span role="text" aria-label="3 of 5 stars">★★★☆☆</span>

James Craig, 28 Apr 2014, 23:05:13

Closed as all associated actions are done.

Joseph Scheuhammer, 23 Feb 2016, 21:38:00

Display change log ATOM feed

James Nurthen <>, Valerie Young <>, Chairs, Daniel Montalvo <>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <>.
$Id: 435.html,v 1.1 2023/05/22 16:31:57 carcone Exp $