Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: fix inconsistency around aria-setsize=-1 #2341

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
13 changes: 10 additions & 3 deletions core-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9852,8 +9852,15 @@ <h3>Group Position</h3>
<a class="property-reference" href="#aria-level"><code>aria-level</code></a
>, <a class="property-reference" href="#aria-posinset"><code>aria-posinset</code></a
>, and <a class="property-reference" href="#aria-setsize"><code>aria-setsize</code></a> are all 1-based. When the [=ARIA/property=] is not present or is &quot;0&quot;, it indicates the
property is not computed or not supported. If any of these properties are specified by the author as either &quot;0&quot; or a negative number, [=user agents=] SHOULD use &quot;1&quot;
instead.
property is not computed or not supported.
</p>
<p>
If the <a class="property-reference" href="#aria-level"><code>aria-level</code></a> or <a class="property-reference" href="#aria-posinset"><code>aria-posinset</code></a> properties are
specified by the author as either &quot;0&quot; or a negative number, [=user agents=] SHOULD use &quot;1&quot; instead.
</p>
<p>
If the <a class="property-reference" href="#aria-setsize"><code>aria-setsize</code></a> property is specified by the author as any string value other than a positive whole number, the set
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
is an indeterminate size. [=User agents=] MUST NOT calculate the set size of an indeterminate set.
</p>
<p>
If <a class="property-reference" href="#aria-level"><code>aria-level</code></a> is not provided or inherited for an element of <a class="termref">role</a>
Expand All @@ -9863,7 +9870,7 @@ <h3>Group Position</h3>
</p>
<p>
If <a class="property-reference" href="#aria-posinset"><code>aria-posinset</code></a> and <a class="property-reference" href="#aria-setsize"><code>aria-setsize</code></a> are not provided,
user agents MUST compute them as follows:
or are specified as the empty string, user agents MUST compute them as follows:
</p>
<ul>
<li>
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12904,10 +12904,10 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<div class="property" id="aria-setsize">
<pdef>aria-setsize</pdef>
<div class="property-description">
<p><a>Defines</a> the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the <abbr title="Document Object Model">DOM</abbr>. See related <pref>aria-posinset</pref>.</p>
<p>This [=ARIA/property=] is marked on the members of a set, not the container element that collects the members of the set. To orient the user by saying an element is "item X out of Y," the <a>assistive technologies</a> would use X equal to the <pref>aria-posinset</pref> <a>attribute</a> and Y equal to the <code>aria-setsize</code> attribute.</p>
<p><a>Defines</a> the number of items in the current set of items, such as listitems, treeitems, options, comments, etc. Not required if all elements in the set are present in the <abbr title="Document Object Model">DOM</abbr>. See related <pref>aria-posinset</pref>.</p>
<p>This [=ARIA/property=] is marked on the members of a set, not the container element that collects the members of the set. To orient the user by saying an element is "item X out of Y" or similar, the <a>assistive technologies</a> would use X equal to the <pref>aria-posinset</pref> <a>attribute</a> and Y equal to the <code>aria-setsize</code> attribute.</p>
<p>If all items up to the current item in a set are present in the document structure, it is not necessary to set this <a>attribute</a>, as the <a>user agent</a> can automatically calculate the position for these items. However, if all previous items in the set are not present in the document structure at a given moment, the author MUST set this <a>attribute</a>to provide an explicit indication of an element's position.</p>
<p>When specifying <code>aria-setsize</code>, authors MUST set the value to an integer equal to the number of items in the set. If the total number of items is unknown, authors SHOULD set the value of <code>aria-setsize</code> to <code>-1</code>.</p>
<p>When specifying <code>aria-setsize</code>, authors MUST set the value to an integer equal to the number of items in the set. If the total number of items is unknown (indeterminate), and the DOM is currently incomplete such that user agents would not be able to compute the correct number of items in a set, authors SHOULD set the value of <code>aria-setsize</code> to a <code>-1</code>.</p>
<p>When specifying <code>aria-setsize</code> on a <rref>menuitem</rref>, <rref>menuitemcheckbox</rref>, or <rref>menuitemradio</rref>, authors SHOULD set the value of <code>aria-setsize</code> based on the total number of items in the <rref>menu</rref>, excluding any separators.</p>
<p>The following example shows items 5 through 8 in a set of 16.</p>
<pre class="example highlight">&lt;h2 id="label_fruit"&gt; Available Fruit &lt;/h2&gt;
Expand Down
Loading