Skip to content

Commit 17750f7

Browse files
committed
Add namefrom:heading again; Will year 6 be the year?
1 parent edd3325 commit 17750f7

File tree

2 files changed

+52
-14
lines changed

2 files changed

+52
-14
lines changed

accname/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,10 @@ <h4>Computation steps</h4>
646646
</p>
647647
</div>
648648
</li>
649+
<li id="comp_name_from_heading">
650+
<em>Name From Heading:</em> Otherwise, if the <code>current node</code> has a role that supports <a class="specref" href="#namefromheading">nameFrom: heading</a>,
651+
return the text alternative of the first descendant <a>element</a> node matching the role of <code>heading</code> in an <em>depth-first search.</em>
652+
</li>
649653
<li id="comp_name_from_content">
650654
<span id="step2F"><!-- Don't link to this legacy numbered ID. --></span><em>Name From Content:</em> Otherwise, if the <code>current node's</code> <a class="termref">role</a> allows
651655
<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

index.html

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,15 +1265,27 @@ <h3>Name From</h3>
12651265
having the lowest precedence for specifying a text alternative.
12661266
</li>
12671267
<li>
1268-
contents: name comes from the text value of the <a>element</a> node. Although this might be allowed in addition to "author" in some <a>roles</a>, this is used in content only if higher
1269-
priority "author" features are not provided. Priority is defined by the <cite><a href="" class="accname">Accessible Name and Description Computation</a></cite> [[ACCNAME-1.2]].
1268+
heading: name comes from the text alternative of the first descendant <a>element</a> node (depth first search) matching the role of <code>heading</code> as defined in the AccName
1269+
computation algorithm for nameFrom: heading. Although "namefrom: heading" is allowed in addition to "namefrom: author" in some <a>roles</a>, "namefrom: heading" is used in content only
1270+
if higher priority "namefrom: author" features are not provided. Priority is defined by the <cite><a href="" class="accname">Accessible Name and Description Computation</a></cite>
1271+
[[ACCNAME-1.2]].
12701272
</li>
1273+
<li>
1274+
contents: name comes from the text value of the <a>element</a> node. Although this might be allowed in addition to "namefrom: author" or "namefrom:heading" in some <a>roles</a>, this
1275+
is used in content only if higher priority "namefrom: author" or "namefrom: heading" features are not provided. Priority is defined by the <cite><a href="" class="accname">Accessible
1276+
Name and Description Computation</a></cite> [[ACCNAME-1.2]].
1277+
</li>
1278+
<li>Priority is defined by the <cite><a href="" class="accname">Accessible Name and Description Computation</a></cite> [[ACCNAME-1.2]].</li>
12711279
<li>prohibited: the element does not support name from author. Authors MUST NOT use the <pref>aria-label</pref> or <pref>aria-labelledby</pref> attributes to name the element.</li>
12721280
</ol>
12731281
<section id="namefromauthor">
12741282
<h4>Roles Supporting Name from Author</h4>
12751283
<div id="index_fromauthor"></div>
12761284
</section>
1285+
<section id="namefromheading">
1286+
<h4>Roles Supporting Name from Heading</h4>
1287+
<div id="index_fromheading"></div>
1288+
</section>
12771289
<section id="namefromcontent">
12781290
<h4>Roles Supporting Name from Content</h4>
12791291
<div id="index_fromcontent"></div>
@@ -1670,7 +1682,12 @@ <h2>Definition of Roles</h2>
16701682
</tr>
16711683
<tr>
16721684
<th class="role-namefrom-head" scope="row">Name From:</th>
1673-
<td class="role-namefrom">author</td>
1685+
<td class="role-namefrom">
1686+
<ul>
1687+
<li>author</li>
1688+
<li>heading</li>
1689+
</ul>
1690+
</td>
16741691
</tr>
16751692
<tr>
16761693
<th class="role-namerequired-head" scope="row">Accessible Name Required:</th>
@@ -1886,7 +1903,12 @@ <h2>Definition of Roles</h2>
18861903
</tr>
18871904
<tr>
18881905
<th class="role-namefrom-head" scope="row">Name From:</th>
1889-
<td class="role-namefrom">author</td>
1906+
<td class="role-namefrom">
1907+
<ul>
1908+
<li>author</li>
1909+
<li>heading</li>
1910+
</ul>
1911+
</td>
18901912
</tr>
18911913
<tr>
18921914
<th class="role-namerequired-head" scope="row">Accessible Name Required:</th>
@@ -3631,7 +3653,7 @@ <h2>Definition of Roles</h2>
36313653
focus to dialogs. See the <a href="https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/">WAI-ARIA Authoring Practices: Dialog (modal) pattern</a> for additional details on implementing
36323654
modal dialog design patterns.
36333655
</p>
3634-
<p>Authors SHOULD provide an accessible name for a dialog, which can be done with the <pref>aria-label</pref> or <pref>aria-labelledby</pref> attribute.</p>
3656+
<p>Authors SHOULD provide an accessible name for a dialog, using either <a href="#namecalculation">namefrom</a>: author or <a href="#namecalculation">namefrom</a>: heading.</p>
36353657
<p>
36363658
Authors SHOULD ensure that all dialogs (both modal and non-modal) have at least one <a>focusable</a> descendant element. Authors SHOULD focus an element in the modal dialog when it is
36373659
displayed, and authors SHOULD constrain keyboard focus to focusable elements within a modal dialog, until dismissed.
@@ -3721,7 +3743,12 @@ <h2>Definition of Roles</h2>
37213743
</tr>
37223744
<tr>
37233745
<th class="role-namefrom-head" scope="row">Name From:</th>
3724-
<td class="role-namefrom">author</td>
3746+
<td class="role-namefrom">
3747+
<ul>
3748+
<li>author</li>
3749+
<li>heading</li>
3750+
</ul>
3751+
</td>
37253752
</tr>
37263753
<tr>
37273754
<th class="role-namerequired-head" scope="row">Accessible Name Required:</th>
@@ -4254,9 +4281,8 @@ <h2>Definition of Roles</h2>
42544281
possible. If the purpose of a form is to submit search criteria, authors SHOULD use the <rref>search</rref> role instead of the generic <code>form</code> role.
42554282
</p>
42564283
<p>
4257-
Authors SHOULD give each element with role <code>form</code> a brief label that describes the purpose of the form. Authors SHOULD reference a visible label with
4258-
<pref>aria-labelledby</pref> if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host
4259-
language heading element or an instance of an element with role <rref>heading</rref>.
4284+
Authors SHOULD give each element with role <code>form</code> a label that describes the purpose of the form, using either <a href="#namecalculation">namefrom</a>: author or
4285+
<a href="#namecalculation">namefrom</a>: heading.
42604286
</p>
42614287
<p>
42624288
If an author uses a script to submit a form based on a user action that would otherwise not trigger an <code>onsubmit</code> event (for example, a form submission triggered by the user
@@ -4320,7 +4346,12 @@ <h2>Definition of Roles</h2>
43204346
</tr>
43214347
<tr>
43224348
<th class="role-namefrom-head" scope="row">Name From:</th>
4323-
<td class="role-namefrom">author</td>
4349+
<td class="role-namefrom">
4350+
<ul>
4351+
<li>author</li>
4352+
<li>heading</li>
4353+
</ul>
4354+
</td>
43244355
</tr>
43254356
<tr>
43264357
<th class="role-namerequired-head" scope="row">Accessible Name Required:</th>
@@ -7984,9 +8015,7 @@ <h5>Presentational Role Inheritance</h5>
79848015
<a href="#landmark_roles">landmark roles</a>, such as <rref>main</rref>, <rref>complementary</rref>, or <rref>navigation</rref>.
79858016
</p>
79868017
<p>
7987-
Authors MUST give each element with role region a brief label that describes the purpose of the content in the region. Authors SHOULD reference a visible label with
7988-
<pref>aria-labelledby</pref> if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host
7989-
language heading element or an instance of an element with role <rref>heading</rref>.
8018+
Authors MUST give each element with role region a label that describes the purpose of the content in the region, using either <a href="#namecalculation">namefrom</a>: author or <a href="#namecalculation">namefrom</a>: heading.
79908019
</p>
79918020
<p>
79928021
<a>Assistive technologies</a> SHOULD enable users to quickly navigate to elements with role <code>region</code>. [=User agents=] SHOULD treat elements with role <code>region</code> and
@@ -8046,7 +8075,12 @@ <h5>Presentational Role Inheritance</h5>
80468075
</tr>
80478076
<tr>
80488077
<th class="role-namefrom-head" scope="row">Name From:</th>
8049-
<td class="role-namefrom">author</td>
8078+
<td class="role-namefrom">
8079+
<ul>
8080+
<li>author</li>
8081+
<li>heading</li>
8082+
</ul>
8083+
</td>
80508084
</tr>
80518085
<tr>
80528086
<th class="role-namerequired-head" scope="row">Accessible Name Required:</th>

0 commit comments

Comments
 (0)