Skip to content

Commit e496a4d

Browse files
aleventhal
authored
term/definition should use aria-details instead of aria-labelledby (#1147)
* term/defnition should use aria-details instead of aria-labelledby * Name is prohibited on a term * Prohibit name on a definition, require that a definition MUST have a term, require that a term with a matching definition MUST use aria-details to point to it * Suggested change to alleviate confusion where there is no definition, that should provide a good screen reader experience in that case. Co-authored-by: Scott O'Hara <[email protected]> Co-authored-by: Carolyn MacLeod <[email protected]> Co-authored-by: James Nurthen <[email protected]>
1 parent 48ad8d4 commit e496a4d

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

index.html

+28-9
Original file line numberDiff line numberDiff line change
@@ -2668,11 +2668,12 @@ <h2>Definition of Roles</h2>
26682668
</table>
26692669
</div>
26702670
<div class="role" id="definition">
2671-
<rdef>definition</rdef>
2672-
<div class="role-description">
2673-
<p>A definition of a term or concept. See related <rref>term</rref>.</p>
2674-
<p>Authors SHOULD identify the <a>element</a> being defined by giving that element a role of <rref>term</rref> and referencing it with the <pref>aria-labelledby</pref> <a>attribute</a> or by making the element with role <rref>term</rref> a descendant of the element with role <code>definition</code>.</p>
2675-
</div>
2671+
<rdef>definition</rdef>
2672+
<div class="role-description">
2673+
<p>A definition of a term or concept. See related <rref>term</rref>.</p>
2674+
<p>Authors MUST identify the <a>element</a> being defined and assign that element a role of <rref>term</rref>.</p>
2675+
<p>Authors SHOULD NOT use the <code>definition</code> role on interactive elements such as form controls because doing so could prevent users of assistive technologies from interacting with those elements.</p>
2676+
</div>
26762677
<table class="role-features">
26772678
<caption>Characteristics:</caption>
26782679
<thead>
@@ -2718,9 +2719,18 @@ <h2>Definition of Roles</h2>
27182719
<th class="role-inherited-head" scope="row">Inherited States and Properties:</th>
27192720
<td class="role-inherited">Placeholder</td>
27202721
</tr>
2722+
<tr>
2723+
<th class="role-disallowed-head" scope="row">Prohibited States and Properties:</th>
2724+
<td class="role-disallowed">
2725+
<ul>
2726+
<li><pref>aria-label</pref></li>
2727+
<li><pref>aria-labelledby</pref></li>
2728+
</ul>
2729+
</td>
2730+
</tr>
27212731
<tr>
27222732
<th class="role-namefrom-head" scope="row">Name From:</th>
2723-
<td class="role-namefrom">author</td>
2733+
<td class="role-namefrom">prohibited</td>
27242734
</tr>
27252735
<tr>
27262736
<th class="role-namerequired-head" scope="row">Accessible Name Required:</th>
@@ -9072,8 +9082,8 @@ <h5>Presentational Roles Conflict Resolution</h5>
90729082
<div class="role" id="term">
90739083
<rdef>term</rdef>
90749084
<div class="role-description">
9075-
<p>A word or phrase with a corresponding definition. See related <rref>definition</rref>.</p>
9076-
<p>The <code>term</code> role is used to explicitly identify a word or phrase for which a <rref>definition</rref> has been provided by the author or is expected to be provided by the user.</p>
9085+
<p>A word or phrase with an optional corresponding definition. See related <rref>definition</rref>.</p>
9086+
<p>The <code>term</code> role is used to explicitly identify a word or phrase for which a <rref>definition</rref> has been provided by the author or is expected to be provided by the user. If there is an existing <rref>definition</rref>, or a form or form control to enter a definition, authors SHOULD set <pref>aria-details</pref> to point to the related element.</p>
90779087
<p>Authors SHOULD NOT use the <code>term</code> role on interactive elements such as links because doing so could prevent users of <a>assistive technologies</a> from interacting with those elements.</p>
90789088
</div>
90799089
<table class="role-features">
@@ -9125,9 +9135,18 @@ <h5>Presentational Roles Conflict Resolution</h5>
91259135
<th class="role-inherited-head" scope="row">Inherited States and Properties:</th>
91269136
<td class="role-inherited">Placeholder</td>
91279137
</tr>
9138+
<tr>
9139+
<th class="role-disallowed-head" scope="row">Prohibited States and Properties:</th>
9140+
<td class="role-disallowed">
9141+
<ul>
9142+
<li><pref>aria-label</pref></li>
9143+
<li><pref>aria-labelledby</pref></li>
9144+
</ul>
9145+
</td>
9146+
</tr>
91289147
<tr>
91299148
<th class="role-namefrom-head" scope="row">Name From:</th>
9130-
<td class="role-namefrom">author</td>
9149+
<td class="role-namefrom">prohibited</td>
91319150
</tr>
91329151
<tr>
91339152
<th class="role-namerequired-head" scope="row">Accessible Name Required:</th>

0 commit comments

Comments
 (0)

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant