forked from w3c/accname
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
402 lines (386 loc) · 31.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Accessible Name and Description Computation 1.2</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<script src="https://www.w3.org/Tools/respec/respec-w3c-common" class="remove"></script>
<script src="common/script/resolveReferences.js" class="remove"></script>
<script src="common/biblio.js" class="remove"></script>
<link href="common/css/common.css" rel="stylesheet" type="text/css"/>
<script class="remove">
var respecConfig = {
useExperimentalStyles: true,
includePermalinks: true,
lint: true,
// specification status (e.g., WD, LC, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
//crEnd: "2012-04-30",
//perEnd: "2013-07-23",
//publishDate: "2013-08-22",
diffTool: "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
// the specifications short name, as in https://www.w3.org/TR/short-name/
shortName: "accname-1.2",
// if you wish the publication date to be other than today, set this
//publishDate: "2014-12-11",
copyrightStart: "2014",
license: "document",
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
//previousPublishDate: "2014-03-20",
//previousMaturity: "REC",
prevRecURI: "https://www.w3.org/TR/accname/",
//previousDiffURI: "https://www.w3.org/TR/2014/REC-wai-aria-implementation-20140320/",
// if there a publicly available Editors Draft, this is the link
edDraftURI: "https://w3c.github.io/accname/",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2012-02-21",
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Bryan Garaventa",
company: "Level Access",
companyURL: "https://www.levelaccess.com/",
w3cid: 67215
},
{ name: "Joanmarie Diggs",
company: "Igalia, S.L.",
companyURL: "https://www.igalia.com/",
w3cid: 68182
},
{ name: "Michael Cooper",
company: "W3C",
companyURL: "https://www.w3.org/",
w3cid: 34017
}
],
formerEditors: [
{ name: "Richard Schwerdtfeger",
company: "Knowbility",
companyURL: "https://knowbility.org/",
w3cid: 2460,
note: "Editor until October 2017"
},
{ name: "Joseph Scheuhammer",
company: "Inclusive Design Research Centre, OCAD University",
companyURL:"https://idrc.ocadu.ca/",
w3cid: 42279,
note: "Editor until May 2017"
},
{ name: "James Craig",
company: "Apple Inc.",
companyURL: "https://www.apple.com/accessibility/",
w3cid: 42459,
note: "Editor until May 2016"
},
{ name: "Andi Snow-Weaver",
company: "IBM",
companyURL: "https://www.ibm.com/",
w3cid: 35445,
note: "Editor until December 2012"
},
{ name: "Aaron Leventhal",
company: "IBM",
companyURL: "https://www.ibm.com/",
w3cid: 34329,
note: "Editor until January 2009"
},
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
//authors: [
// { name: "Your Name", url: "https://example.org/",
// company: "Your Company", companyURL: "https://example.com/" },
//],
/*
alternateFormats: [
{ uri: 'aria-implementation-diff.html',
label: "Diff from Previous Recommendation" } ,
{ uri: 'aria-implementation.ps',
label: "PostScript version" },
{ uri: 'aria-implementation.pdf',
label: "PDF version" }
],
*/
// Working group info
wg: "Accessible Rich Internet Applications Working Group",
wgURI: "https://www.w3.org/WAI/ARIA/",
wgPublicList: "public-aria",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI: "https://www.w3.org/2004/01/pp-impl/83726/status",
tocIntroductory: true,
//maxTocLevel: 4,
// Spec URLs
ariaSpecURLs: {
"ED": "https://w3c.github.io/aria/",
"WD" : "https://www.w3.org/TR/wai-aria-1.2/",
"FPWD": "https://www.w3.org/TR/wai-aria-1.2/",
"REC": "https://www.w3.org/TR/wai-aria/"
},
coreMappingURLs: {
"ED": "https://w3c.github.io/core-aam/",
"WD" : "https://www.w3.org/TR/core-aam-1.2/",
"FPWD": "https://www.w3.org/TR/core-aam-1.2/",
"REC": "https://www.w3.org/TR/core-aam-1.2/"
},
localBiblio: biblio,
preProcess: [ linkCrossReferences ]
}
</script>
</head>
<body>
<section id="abstract">
<p>This document describes how <a class="termref">user agents</a> determine the <a class="termref" data-lt="accessible name">names</a> and <a class="termref" data-lt="accessible description">descriptions</a> of <a class="termref">accessible objects</a> from web content languages. This information is in turn exposed through <a class="termref">accessibility <abbr title="Application Programming Interfaces">APIs</abbr></a> so that <a class="termref">assistive technologies</a> 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 accessibility APIs and helps to ensure that this information appears in a manner consistent with author intent.</p>
<p>The accessible name and description computation specification defines support that applies across multiple content technologies. This includes accessible name and description provided by general-purpose <cite><a href="https://www.w3.org/TR/wai-aria-1.2/"><abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr></a></cite> [[WAI-ARIA]] <a class="termref">roles</a>, <a class="termref">states</a>, and <a class="termref">properties</a> as well as features specific to individual content languages.</p>
<p>This document updates and will eventually supersede the accessible name and description guidance in the <a href="https://www.w3.org/TR/accname-1.1/">Accessible Name and Description Computation 1.1</a> [[ACCNAME-1.1]] W3C Recommendation. It is part of the <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> suite described in the <a href="https://www.w3.org/WAI/intro/aria.php"><abbr title="Accessible Rich Internet Application">WAI-ARIA</abbr> Overview</a>.</p>
</section>
<section id="sotd">
</section>
<section id="intro" class="informative">
<h2>Introduction</h2>
<p><a class="termref">User agents</a> acquire information from the <abbr title="Document Object Model">DOM</abbr> [[DOM]] and create a parallel structure called the <a class="termref">accessibility tree</a>, made up of <a class="termref">accessible objects</a>. An accessible object provides information about its <a class="termref">role</a>, <a class="termref">states</a>, and <a class="termref">properties</a>. An example is an accessible object whose role is <code>menuitem</code>, is currently in an <code>enabled</code> state, with a <code>haspopup</code> property, indicating that it leads to a sub-menu. </p>
<p>The two properties of accessible objects described in this document are its <a class="termref">accessible name</a> and <a class="termref">accessible description</a>. 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 is <code>New</code>, signifying that the menu item provides for the creation of new documents, windows, and so on. </p>
<p>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.</p>
<p><a class="termref">Accessibility <abbr title="Application Programming Interfaces">APIs</abbr></a> currently support flat, unstructured strings for accessible names and descriptions. The result of the name/description computation is thus a flat string. </p>
<p>The terms "accessible name" and "accessible description" are used to emphasize that they are properties of <a class="termref">accessible objects</a> as exposed by <a class="termref">Accessibility <abbr title="Application Programming Interfaces">APIs</abbr></a>. However, they are frequently referred to hereafter as simply "name" and "description".</p>
</section>
<section id="conformance">
<section>
<h3>RFC-2119 Keywords</h3>
<p>RFC-2119 keywords are formatted in uppercase and contained in a <code>strong</code> element with <code>class="rfc2119"</code>. When the keywords shown above are used, but do not share this format, they do not convey formal information in the RFC 2119 sense, and are merely explanatory, i.e., informative. As much as possible, such usages are avoided in this specification.</p>
</section>
<section>
<h3>Normative and Informative Sections</h3>
<p>The indication whether a section is <a class="termref">normative</a> or <a class="termref">non-normative</a> (informative) applies to the entire section including sub-sections.</p>
<p>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.</p>
</section>
</section>
<section id="glossary">
<h2>Important Terms</h2>
<div data-include="common/terms.html" data-oninclude="restrictReferences"></div>
</section>
<section id="mapping_additional_nd" class="normative">
<h2>Name and Description</h2>
<p>The starting point of the name and description computation is a <abbr title="Document Object Model">DOM</abbr> <a class="termref">element</a>. The output is a flat, unstructured string that can be as simple as a single word, or a string of space-separated tokens. Examples include <code>Save</code> and <code>Reload from disk</code>.</p>
<p>An important factor is the <a class="termref">element</a>'s <a class="termref">role</a>, that determines which content contributes to the name string. Roles have a <code>nameFrom</code> <abbr title="Resource Description Framework">RDF</abbr> property, with two possible values: </p>
<dl class="runin">
<dt>author</dt>
<dd>name is generated from values provided by the author in explicit markup features such as the <code>aria-label</code> and <code>aria-labelledby</code> <a class="termref">attribute</a>, or a host language labeling mechanism, such as the <code>alt</code> or <code>title</code> <a class="termref">attribute</a> in <abbr title="Hypertext Markup Language">HTML</abbr>, or the <code>desc</code> <a class="termref">element</a> in <abbr title="Scalable Vector Graphics">SVG</abbr>. </dd>
<dt>contents</dt>
<dd>name is generated from the <a class="termref" data-lt="text node">Text nodes</a> associated with the <a class="termref">element</a>. Although this may be allowed in addition to "author" in some <a class="termref">roles</a>, "content" is used only if higher priority "author" features are not provided. Priority is defined by the <a href="#mapping_additional_nd_te">accessible name and description computation</a> algorithm.</dd>
</dl>
<p>The <cite><a class="specref" href="#">Accessible Rich Internet Applications (WAI-ARIA) 1.2</a></cite> [[!WAI-ARIA]] specification provides lists of roles that support <a class="specref" href="#namefromauthor">name from author</a> and <a class="specref" href="#namefromcontent">name from content</a>. </p>
<section id="mapping_additional_nd_name">
<h3>Name Computation</h3>
<p><a class="termref">User agents</a> MUST compute an <a class="termref">accessible name</a> using the rules outlined below in the section titled <a href="#mapping_additional_nd_te">Accessible Name and Description Computation</a>.</p>
</section>
<section id="mapping_additional_nd_description">
<h3>Description Computation</h3>
<p>If <a class="property-reference" href="#aria-describedby"><code>aria-describedby</code></a> is present, <a class="termref">user agents</a> MUST compute the accessible description by concatenating the text alternatives for elements referenced by an <code>aria-describedby</code> attribute on the current element. The text alternatives for the referenced elements are computed using a number of methods, outlined below in the section titled <a href="#mapping_additional_nd_te">Accessible Name and Description Computation</a>. </p>
</section>
<section id="mapping_additional_nd_te">
<h3>Accessible Name and Description Computation</h3>
<p>The accessible name and description computation is used to generate both the <a class="termref">accessible name</a> and <a class="termref">accessible description</a>. There are different rules provided for several different types of <a class="termref">elements</a>, <a class="termref" data-lt="node">nodes</a>, and combinations of markup. Text alternatives are built up, when appropriate, from all the relevant content contained within an <a class="termref">element</a>. 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. </p>
<p>The purpose of the computation is to create a <a class="termref">perceivable</a> label or description for alternative presentations, in the form of a flat string of space separated textual tokens. </p>
<section id="terminology">
<h4>Terminology</h4>
<dl>
<dt>Root node</dt>
<dd>The <abbr title="Document Object Model">DOM</abbr> <a class="termref">node</a> or <a class="termref">element</a> for which the text alternative is sought.</dd>
<dt>Current node</dt>
<dd>The <abbr title="Document Object Model">DOM</abbr> <a class="termref">node</a> currently traversed to compute the <code>root node</code>'s text equivalent. Initially, the <code>current node</code> is the <code>root node</code>, but at later stages is either some descendant of the <code>root node</code>, or another referenced node.</dd>
<dt>Flat string</dt>
<dd>A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup. </dd>
<dt>Total accumulated text</dt>
<dd>The text equivalent computed up to, but not including the <code>current node</code>.</dd>
<dt>Accumulated text</dt>
<dd>Text accumulated at a step or sequence of steps described below. It is temporary storage for those steps.</dd>
<dt>Result</dt>
<dd>The text equivalent computed at one of the steps described below.</dd>
<dt>Append the result, without a space, to X</dt>
<dd>
<ul>
<li>If X is empty, copy the <code>result</code> to X.</li>
<li>If X is non-empty, copy the <code>result</code> to the end of X.</li>
</ul>
</dd>
<dt>Append the result, with a space, to X</dt>
<dd>
<ul>
<li>If X is empty, copy the <code>result</code> to X.</li>
<li>If X is non-empty, add a space to the end of X and then copy the <code>result</code> to X after the space.</li>
</ul>
</dd>
<dt>Prepend result, without a space, to X</dt>
<dd>
<ul>
<li>If X is empty, copy the <code>result</code> to X.</li>
<li>If X is non-empty, copy the <code>result</code> to the start of X.</li>
</ul>
</dd>
<dt>Prepend the result, with a space, to X</dt>
<dd>
<ul>
<li>If X is empty, copy the <code>result</code> to X.</li>
<li>If X is non-empty, copy the <code>result</code> to the start of X, and add a space after the copy.</li>
</ul>
</dd>
</dl>
</section>
<p>The text alternative for a given element is computed as follows:</p>
<ol>
<li id="step1">Set the <code>root node</code> to the given element, the <code>current node</code> to the <code>root node</code>, and the <code>total accumulated text</code> to the empty string (""). If the <code>root node</code>'s role prohibits naming, return the empty string ("").</li>
<li id="step2">Compute the text alternative for the <code>current node</code>:
<ol>
<li id="step2A">If the <code>current node</code> is <a class="termref">hidden</a> <strong>and is not</strong> directly referenced by <code>aria-labelledby</code> or <code>aria-describedby</code>, nor directly referenced by a native host language text alternative <a class="termref">element</a> (e.g. <code>label</code> in HTML) or <a class="termref">attribute</a>, return the empty string.
<div><details>
<summary>Comment:</summary>
<p>By default, <a class="termref">assistive technologies</a> do not relay hidden information, but an author can explicitly override that and include hidden text as part of the <a class="termref">accessible name</a> or <a class="termref">accessible description</a> by using <code>aria-labelledby</code> or <code>aria-describedby</code>. </p>
</details></div>
</li>
<li id="step2B">Otherwise:
<ul>
<li>if computing a <a class="termref" data-lt="accessible name">name</a>, and the <code>current node</code> has an <code>aria-labelledby</code> <a class="termref">attribute</a> that contains at least one valid IDREF, and the <code>current node</code> is not already part of an <code>aria-labelledby</code> traversal, process its IDREFs in the order they occur: </li>
<li>or, if computing a <a class="termref" data-lt="accessible description">description</a>, and the <code>current node</code> has an <code>aria-describedby</code> <a class="termref">attribute</a> that contains at least one valid IDREF, and the <code>current node</code> is not already part of an <code>aria-describedby</code> traversal, process its IDREFs in the order they occur:
<ol>
<li id="step2B.i">Set the <code>accumulated text</code> to the empty string.</li>
<li id="step2B.ii">For each IDREF:
<ol>
<li id="step2B.ii.a">Set the <code>current node</code> to the node referenced by the IDREF.</li>
<li id="step2B.ii.b">Compute the text alternative of the <code>current node</code> beginning with step 2. Set the <code>result</code> to that text alternative.</li>
<li id="step2B.ii.c">Append the <code>result</code>, with a space, to the <code>accumulated text</code>.</li>
</ol>
</li>
<li id="step2B.iii">Return the <code>accumulated text</code>.</li>
</ol>
</li>
</ul>
<div><details>
<summary>Example:</summary>
<p>The following example shows the meaning of the clause "… and the <code>current node</code> is not already part of an <code>aria-labelledby</code> traversal …" .</p>
<ul>
<li><code>element1</code>'s <a class="termref">accessible name</a> is "hello" because this is a first traversal of its <code>aria-labelledby</code>, leading to <code>element3</code>.</li>
<li><code>element2</code> has no <a class="termref">accessible name</a>. The computation involves a first traversal of its <code>aria-labelledby</code> leading to <code>element1</code>, but <code>element1</code>'s <code>aria-labelledby</code> is not subsequently followed. </li>
</ul>
<pre class="example highlight"><code><element1 id="el1" aria-labelledby="el3" />
<element2 id="el2" aria-labelledby="el1" />
<element3 id="el3"> hello </element3></code>
</pre>
</details></div>
</li>
<li id="step2C">Otherwise, if computing a <a class="termref" data-lt="accessible name">name</a>, and if the <code>current node</code> has an <code>aria-label</code> <a class="termref">attribute</a> whose value is not the empty string, nor, when trimmed of white space, is not the empty string:
<ul>
<li>If traversal of the <code>current node</code> is due to recursion <strong>and</strong> the <code>current node</code> is an embedded control as defined in step 2E, ignore <code>aria-label</code> and skip to rule 2E.</li>
<li>Otherwise, return the value of <code>aria-label</code>.</li>
</ul>
<div><details>
<summary>Example:</summary>
<p>The following example shows the interaction of <code>aria-labelledby</code> and <code>aria-label</code> when a <a class="termref">node</a> has an <code>aria-labelledby</code> that refers to itself. The <code><span role="button"></code> elements have the <a class="termref">accessible names</a> "Delete Documentation.pdf" and "Delete HolidayLetter.pdf", respectively.</p>
<pre class="example highlight"><code><h1>Files</h1>
<ul>
<li>
<a id="file_row1" href="./files/Documentation.pdf">Documentation.pdf</a>
<strong><span role="button" tabindex="0" id="del_row1" aria-label="Delete" aria-labelledby="del_row1 file_row1"></span></strong>
</li>
<li>
<a id="file_row2" href="./files/HolidayLetter.pdf">HolidayLetter.pdf</a>
<strong><span role="button" tabindex="0" id="del_row2" aria-label="Delete" aria-labelledby="del_row2 file_row2"></span></strong>
</li>
</ul></code></pre>
</details></div>
</li>
<li id="step2D">Otherwise, if the <code>current node</code>'s native markup provides an <a class="termref">attribute</a> (e.g. <code>title</code>) or <a class="termref">element</a> (e.g. HTML <code>label</code>) that defines a text alternative, return that alternative in the form of a <code>flat string</code> as defined by the host language, unless the element is marked as presentational (<code>role="presentation"</code> or <code>role="none"</code>).
<div><details>
<summary>Comment:</summary>
<p>For example, in <abbr title="Hypertext Markup Language">HTML</abbr>, the <code>img</code> element's <code>alt</code> attribute defines a text alternative string, and the <code>label</code> element provides text for the referenced form element. In <abbr title="SVG2">SVG2</abbr>, the <code>desc</code> and <code>title</code> elements provide a description of their parent element. </p>
</details></div>
</li>
<li id="step2E">Otherwise, if the <code>current node</code> is a control embedded within the label (e.g. the <code>label</code> element in HTML or any element directly referenced by <code>aria-labelledby</code>) for another <a class="termref">widget</a>, where the user can adjust the embedded control's value, then include the embedded control as part of the text alternative in the following manner:
<ul>
<li>If the embedded control has role <a class="role-reference" href="#textbox">textbox</a>, return its value.</li>
<li>If the embedded control has role menu <a class="role-reference" href="#button">button</a>, return the text alternative of the button.</li>
<li>If the embedded control has role <a class="role-reference" href="#combobox">combobox</a> or <a class="role-reference" href="#listbox">listbox</a>, return the text alternative of the chosen <a class="role-reference" href="#option">option</a>.</li>
<li>If the embedded control has role <a class="role-reference" href="#range">range</a> (e.g., a <a class="role-reference" href="#spinbutton">spinbutton</a> or <a class="role-reference" href="#slider">slider</a>):
<ul>
<li>If the <code>aria-valuetext</code> property is present, return its value, </li>
<li>Otherwise, if the <code>aria-valuenow</code> property is present, return its value,</li>
<li>Otherwise, use the value as specified by a host language attribute. </li>
</ul>
</li>
</ul>
<div><details>
<summary>Example:</summary>
<p>Consider a label of a check box 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.: </p>
<pre class="example highlight"><code><input type="checkbox" aria-labelledby="label">
<label id="label">Flash the screen <input type="text" value="5"> times</label></code></pre>
</details></div>
</li>
<li id="step2F">Otherwise, if the <code>current node's</code> <a class="termref">role</a> allows <a class="specref" href="#namefromcontent">name from content</a>, or if the <code>current node</code> is referenced by <code>aria-labelledby</code>, <code>aria-describedby</code>, or is a native host language text alternative <a class="termref">element</a> (e.g. <code>label</code> in HTML), or is a descendant of a native host language text alternative <a class="termref">element</a>:
<ol>
<li id="step2F.i">Set the <code>accumulated text</code> to the empty string.</li>
<li id="step2F.ii">Check for <abbr title="Cascading Style Sheets">CSS</abbr> generated textual content associated with the <code>current node</code> and include it in the <code>accumulated text</code>. The <abbr title="Cascading Style Sheets">CSS</abbr> <a href="https://www.w3.org/TR/CSS2/generate.html#before-after-content"><code>:before</code> and <code>:after</code></a> pseudo elements [[!CSS2]] can provide textual content for <a class="termref">elements</a> that have a content model.
<ul>
<li>For <code>:before</code> pseudo elements, <a class="termref">User agents</a> MUST prepend <abbr title="Cascading Style Sheets">CSS</abbr> textual content, without a space, to the textual content of the <code>current node</code>. </li>
<li>For <code>:after</code> pseudo elements, <a class="termref">User agents</a> MUST append <abbr title="Cascading Style Sheets">CSS</abbr> textual content, without a space, to the textual content of the <code>current node</code>. </li>
</ul>
</li>
<li id="step2F.iii">For each child node of the <code>current node</code>:
<ol>
<li id="step2F.iii.a">Set the <code>current node</code> to the child node.</li>
<li id="step2F.iii.b">Compute the text alternative of the <code>current node</code> beginning with step 2. Set the <code>result</code> to that text alternative.</li>
<li id="step2F.iii.c">Append the <code>result</code> to the <code>accumulated text</code>. </li>
</ol>
</li>
<li id="step2F.iv">Return the <code>accumulated text</code>.</li>
</ol>
<p><strong>Important</strong>: Each <a class="termref">node</a> 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. </p>
<div><details>
<summary>Comment:</summary>
<p>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 the <code>current node</code>'s subtree, no matter how deep it is. However, any given descendant <a class="termref">node</a>'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. </p>
</details></div>
</li>
<li id="step2G">Otherwise, if the <code>current node</code> is a <a class="termref">Text node</a>, return its textual contents.</li>
<li id="step2H">Otherwise, if the <code>current node</code> is a descendant of an element whose <a class="termref">Accessible Name</a> or <a class="termref">Accessible Description</a> is being computed, and contains descendants, proceed to 2F.i.
</li>
<li id="step2I">Otherwise, if the <code>current node</code> has a <a class="termref">Tooltip attribute</a>, return its value.
<div><details>
<summary>Comment:</summary>
<p>Tooltip attributes are used only if nothing else, including subtree content, has provided results. </p>
</details></div>
</li>
</ol>
<p>Append the <code>result</code> of each step above, with a space, to the <code>total accumulated text</code>.</p>
</li>
</ol>
<p>After all steps are completed, the <code>total accumulated text</code> is used as the <a class="termref">accessible name</a> or <a class="termref">accessible description</a> of the <a class="termref">element</a> that initiated the computation.</p>
</section>
</section>
<section>
<h3>Accessible Name and Description Mapping</h3>
<p>Information concerning name and description accessibility API mappings, including relationships, such as labelled-by/label-for and described-by/description-for, is documented in the <a href="" class="core-mapping">Core Accessibility <abbr title="Application Programming Interface">API</abbr> Mappings</a> specification [[!CORE-AAM-1.2]]. See the mapping table entries for <a class="core-mapping" href="#ariaLabel"><code>aria-label</code></a>, <a class="core-mapping" href="#ariaLabelledBy"><code>aria-labelledby</code></a>, and <a class="core-mapping" href="#ariaDescribedBy"><code>aria-describedby</code></a>.</p>
</section>
<section>
<h2>Appendices</h2>
<section class="appendix" id="changelog">
<h2>Change Log</h2>
<section>
<h2>Substantive changes since the last public working draft</h2>
<ul>
<!-- EdNote: After each WD publish, move contents of this list into the next one below. -->
</ul>
</section>
<section>
<h2>Substantive changes since the <a href="https://www.w3.org/TR/accname-1.1/">Accessible Name and Description Computation 1.1 Recommendation</a></h2>
<ul>
<!-- EdNote: After each WD publish, move previous list into this one. -->
<li>27-June-2019: Add statement allowing for the possibility of naming being prohibited on the root node. Note: This change in and of itself has no implementation impact, but it allows other specifications to optionally prohibit naming for a top-level element. Furthermore, even if this prohibition is made within a specification, that prohibition will not have any impact on calculating name from contents.</li>
</ul>
</section>
</section> <div data-include='common/acknowledgements.html' data-include-replace='true'></div>
</section>
</body>
</html>