Copyright © 2014-2026World Wide Web Consortium.W3C®liability,trademark andpermissive document license rules apply.
This document describes howuser agents determine thenames anddescriptions ofaccessible objects from web content languages. This information is in turn exposed throughaccessibilityAPIs so thatassistive technologies can identify these objects and present their names or descriptions to users. Documenting the algorithm through which names and descriptions are to be determined promotes interoperable exposure of these properties among different accessibilityAPIs and helps to ensure that this information appears in a manner consistent with author intent.
The accessible name and description computation specification defines support that applies across multiple content technologies. This includes accessible name and description provided by general-purposeWAI-ARIA [WAI-ARIA]roles,states, andproperties as well as features specific to individual content languages.
This document updates and will eventually supersede the accessible name and description guidance in theAccessible Name and Description Computation 1.1 [ACCNAME-1.1]W3C Recommendation. It is part of theWAI-ARIA suite described in theWAI-ARIA Overview.
This section describes the status of this document at the time of its publication. A list of currentW3C publications and the latest revision of this technical report can be found in theW3C standards and drafts index.
This document was published by theAccessible Rich Internet Applications Working Group as an Editor's Draft.
Publication as an Editor's Draft does not imply endorsement byW3C and its Members.
This is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to cite this document as other than a work in progress.
This document was produced by a group operating under theW3C Patent Policy.W3C maintains apublic list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent that the individual believes containsEssential Claim(s) must disclose the information in accordance withsection 6 of theW3C Patent Policy.
This document is governed by the18 August 2025W3C Process Document.
This section is non-normative.
User agents acquire information from theDOM [DOM] and create a parallel structure called theaccessibility tree, made up ofaccessible objects. An accessible object provides information about itsrole,states, andproperties. An example is an accessible object whose role ismenuitem, is currently in anenabled state, with ahaspopup property, indicating that it leads to a sub-menu.
The two properties of accessible objects described in this document are itsaccessible name andaccessible description. The name is a short label that provides information about the purpose of the object. An example of an accessible name for a menu item isNew, signifying that the menu item provides for the creation of new documents, windows, and so on.
The description is a short explanation that further clarifies the nature of the accessible object. It is not always necessary to provide a description if the name is sufficient, but it can help a user better understand the use of the object.
AccessibilityAPIs currently support flat, unstructured strings for accessible names and descriptions. The result of the name/description computation is thus a flat string.
The terms "accessible name" and "accessible description" are used to emphasize that they are properties ofaccessible objects as exposed byAccessibilityAPIs. However, they are frequently referred to hereafter as simply "name" and "description".
This section is non-normative.
While some terms are defined in place, the following definitions are used throughout this document.
Hardware and/or software that:
This definition may differ from that used in other documents.
Examples of assistive technologies that are important in the context of this document include the following:
An accessible description provides additional information, related to an interface element, that complements theaccessible name. The accessible description might or might not be visually perceivable.
The accessible name is the name of a user interface element. Each platformaccessibilityAPI provides the accessible name property. The value of the accessible name may be derived from a visible (e.g., the visible text on a button) or invisible (e.g., the text alternative that describes an icon) property of the user interface element. See relatedaccessible description.
A simple use for the accessible name property may be illustrated by an "OK" button. The text "OK" is the accessible name. When the button receives focus, assistive technologies may concatenate the platform's role description with the accessible name. For example, a screen reader may speak "push-button OK" or "OK button". The order of concatenation and specifics of the role description (e.g., "button", "push-button", "clickable button") are determined by platformaccessibilityAPIs orassistive technologies.
Any host language attribute that would result in a user agent generating a tooltip such as in response to a mouse hover in desktop user agents.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key wordsMAY,MUST, andMUST NOT in this document are to be interpreted as described inBCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
Normative sections provide requirements that authors, user agents and assistive technologiesMUST follow for an implementation to conform to this specification.
Non-normative (informative) sections provide information useful to understanding the specification. Such sections may contain examples of recommended practice, but it is not required to follow such recommendations in order to conform to this specification.
The starting point of the name and description computation is aDOMelement. The output is a flat, unstructured string that can be as simple as a single word, or a string of space-separated tokens. Examples includeSave andReload from disk.
An important factor is theelement'srole, that determines which content contributes to the name string. Roles have anameFromRDF property, with three possible values:
aria-label andaria-labelledbyattribute, or a host language labeling mechanism, such as thealt ortitleattribute inHTML, or thedescelement inSVG.aria-label oraria-labelledby attributes to name the element.TheAccessible Rich Internet Applications (WAI-ARIA) 1.2 [WAI-ARIA] specification provides lists ofroles that support name from author,roles that support name from content androles that cannot be named.
User agentsMUST compute anaccessible name using the rules outlined below in the section titledText Equivalent Computation.
The following table provides the order of precedence for markup that can be applied to compute anaccessible description.User agentsMUST use the first applicable entry from the table where the listed conditions are met, as described in the last column. The user agentMUST NOT use any markup other that the first relevant markup found, even if that markup results in an empty description:
| Precedence | Attribute | Applicable conditions | How used to compute description |
|---|---|---|---|
| 1 | aria-describedby attribute | Use on any element | Name computation on all nodes referenced by aria-describedby on the element, concatenated, and separated by a space character |
| 2 | aria-description attribute | Use on any element | As a flat string |
| 3 | host language features which participate in the description calculation | Unique host language featuresMAY participate in the description computation for an element, only if they were not already used for the accessible name of the applicable element. SeeHTML AAM: Accessible Description Computation for theHTML elements which meet this condition. | Either atext equivalent computation of the host language element, or the string value of the host language attribute. |
| 4 | host language tooltip attribute or equivalent feature (e.g.,HTMLtitle attribute) |
| As a flat string |
The text equivalent computation is used by both theaccessible name andaccessible description. There are different rules provided for several different types ofelements,nodes, and combinations of markup. Text alternatives are built up, when appropriate, from all the relevant content contained within anelement. This is accomplished via steps 2B and 2F, which are recursive, using the full set of rules to retrieve text from its own children or nodes it references.
The purpose of the computation is to create aperceivable label or description for alternative presentations, in the form of a flat string of space separated textual tokens.
root node's text equivalent. Initially, thecurrent node is theroot node, but at later stages is either some descendant of theroot node, or another referenced node.current node.result to X.result to the end of X.result to X.result to X after the space.result to X.result to the start of X.result to X.result to the start of X, and add a space after the copy.The text alternative for a given element is computed as follows:
root node to the given element, thecurrent node to theroot node, and thetotal accumulated text to the empty string (""). If theroot node's role prohibits naming, return the empty string ("").current node:current node ishiddenand is:aria-labelledby oraria-describedby traversal, where the node directly referenced by that relation was hidden.label inHTML) orattribute traversal, where the root of that traversal was hidden.It's important to clarify the broad definition of hidden for the purposes of accessible name calculation:
display:none,visibility:hidden,visibility:collapse orcontent-visibility:hidden: They are considered hidden, as they match the guidelines "not perceivable" and "explicitly hidden".opacity:0 orfilter:opacity(0%), or similarSVG mechanisms: They are not considered hidden. Text hidden with these methods can still be selected or copied, and user agents still expose it in their accessibility trees.aria-hidden="true" property: it is considered hidden, matching the "explicitly hidden" guideline. By default,assistive technologies do not relay hidden information, but an author can explicitly override that and include hidden text as part of theaccessible name oraccessible description by usingaria-labelledby oraria-describedby.
The following examples show the meaning of the clause "Not part of anaria-labelledby oraria-describedby traversal, where the node directy referenced by that relation was hidden.".
First,element1'saccessible name is "hello" because, althoughelement3 is hidden, it is part of anaria-labelledby traversal started inelement2, which is hidden too.
<element1 id="el1" role="button" aria-labelledby="el2" /> <element2 id="el2" class="hidden"> <element3 id="el3" class="hidden">hello</element3> </element2> Conversely,element1 has noaccessible name ifelement3 is hidden and it is part of anaria-labelledby traversal started inelement2, butelement2 is not hidden.
<element1 id="el1" role="button" aria-labelledby="el2" /><element2 id="el2"> <element3 id="el3" class="hidden">hello</element3></element2>current node has anaria-labelledbyattribute that contains at least one valid IDREF, and thecurrent node is not already part of an ongoingaria-labelledby oraria-describedby traversal, process its IDREFs in the order they occur:accumulated text to the empty string.current node to the node referenced by the IDREF.current node beginning with the overallComputation step. Set theresult to that text alternative.result to theaccumulated text.accumulated text if it is not the empty string (""). The result ofLabelledBy Traversal in combination withHidden Not Referenced means thatuser agentsMUST include all nodes in the subtree as part of theaccessible name oraccessible description, when the node referenced byaria-labelledby oraria-describedby is hidden.
The following example shows the meaning of the clause "… and thecurrent node is not already part of anaria-labelledby traversal …" .
element1'saccessible name is "hello" because this is a first traversal of itsaria-labelledby, leading toelement3.element2 has noaccessible name. The computation involves a first traversal of itsaria-labelledby leading toelement1, butelement1'saria-labelledby is not subsequently followed.<element1 id="el1" aria-labelledby="el3" /><element2 id="el2" aria-labelledby="el1" /><element3 id="el3"> hello </element3>current node is a control embedded within the label (e.g. any element directly referenced byaria-labelledby) for anotherwidget, where the user can adjust the embedded control's value, then return the embedded control as part of the text alternative in the following manner:aria-valuetext property is present, return its value,aria-valuenow property is present, return its value,Consider acheck box label that contains a text input field: "Flash the screen [input] times". If the input field has the value "5", the complete label is "Flash the screen 5 times", e.g.:
<label for="flash"> <input type="checkbox" id="flash"> Flash the screen <span tabindex="0" role="textbox" aria-label="number of times" contenteditable>5</span> times.</label>current node is not aslot element and has anaria-labelattribute whose value is not undefined, not the empty string, nor, when trimmed ofwhitespace, is not the empty string:current node is due toName From Content descendant node recursionand thecurrent node is an embedded control, ignorearia-label and skip to ruleEmbedded Control.aria-label. The following example shows the interaction ofaria-labelledby andaria-label when anode has anaria-labelledby that refers to itself. The<span role="button"> elements have theaccessible names "Delete Documentation.pdf" and "Delete HolidayLetter.pdf", respectively.
<h1>Files</h1><ul><li><aid="file_row1"href="./files/Documentation.pdf">Documentation.pdf</a><spanrole="button"tabindex="0"id="del_row1"aria-label="Delete"aria-labelledby="del_row1 file_row1"></span></li><li><aid="file_row2"href="./files/HolidayLetter.pdf">HolidayLetter.pdf</a><spanrole="button"tabindex="0"id="del_row2"aria-label="Delete"aria-labelledby="del_row2 file_row2"></span></li></ul>current node's native markup provides anattribute (e.g.alt) orelement (e.g.HTMLlabel orSVGtitle) that defines a text alternative, return that alternative in the form of aflat string as defined by the host language (e.g.,HTML-AAM), unless thecurrent node is exposed as presentational (role="presentation" orrole="none",alt="").current node'srole allowsname from content, or if thecurrent node is referenced byaria-labelledby,aria-describedby, or is a native host language text alternativeelement (e.g.label inHTML), or is a descendant of a native host language text alternativeelement:accumulated text to the empty string.current node and include it in theaccumulated text. TheCSS::before and::after pseudo elements [CSS2] can provide textual content forelements that have a content model, in addition to the::marker pseudo element.::marker pseudo elements,User agentsMUST prependCSS textual content, without a space, to the textual content of thecurrent node if thecurrent node supports::marker.::before pseudo elements,User agentsMUST prependCSS textual content, without a space, to the textual content of thecurrent node.::after pseudo elements,User agentsMUST appendCSS textual content, without a space, to the textual content of thecurrent node.rendered child nodes of thecurrent node:current node has an attachedshadow root, set therendered child nodes to be the child nodes of theshadow root.current node is aslot withassigned nodes, set therendered child nodes to be theassigned nodes of thecurrent node.rendered child nodes to be the child nodes of thecurrent node.rendered child node of thecurrent node:current node to therendered child node.current node beginning with the overallComputation step. Set theresult to that text alternative.result to theaccumulated text.accumulated text if it is not the empty string ("").Important: Eachnode in the subtree is consulted only once. If text has been collected from a descendant, but is referenced by another IDREF in some descendant node, then that second, or subsequent, reference is not followed. This is done to avoid infinite loops.
This step can apply to the child nodes themselves, which means the computation is recursive and results in text collected from all the elements in thecurrent node's subtree, no matter how deep it is. However, any given descendantnode's text alternative can result from higher precedent markup described in steps B through D above, where "Namefrom: author" attributes provide the text alternative for the entire subtree.
18 January 2024: The ARIA Working Group is considering the feasibility of joining text strings with and without spaces, depending on theCSSdisplay value of thecurrent node, and its adjacent nodes and pseudo-elements. The ongoing discussion is inAccName #225.
current node is atext node, return its textual contents.current node is a descendant of an element whoseAccessible Name orAccessible Description is being computed, and contains descendants, proceed toName From Content Reset.current node has aTooltip attribute, return its value.Tooltip attributes are used only if nothing else, including subtree content, has provided results.
result of each step above to thetotal accumulated text.total accumulated text is used as theaccessible name oraccessible description of theelement that initiated the computation. Information concerning name and description accessibilityAPI mappings, including relationships, such as labelled-by/label-for and described-by/description-for, is documented in theCore AccessibilityAPI Mappings specification [CORE-AAM-1.2]. See the mapping table entries foraria-label,aria-labelledby, andaria-describedby.
This section is non-normative.
The following people contributed to the development of this document.
This publication has been funded in part with U.S. Federal funds from the Department of Education, National Institute on Disability, Independent Living, and Rehabilitation Research (NIDILRR), initially under contract number ED-OSE-10-C-0067, then under contract number HHSP23301500054C, and now under HHS75P00120P00168. The content of this publication does not necessarily reflect the views or policies of the U.S. Department of Education, nor does mention of trade names, commercial products, or organizations imply endorsement by the U.S. Government.
Referenced in:
Referenced in: