Skip to content

Commit d2c9883

Browse files
authored
Align ARIAMixin with changes in HTML (#1876)
1 parent 9bf6e21 commit d2c9883

File tree

1 file changed

+5
-37
lines changed

1 file changed

+5
-37
lines changed

index.html

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13589,32 +13589,18 @@ <h2>Interface Mixin <dfn>ARIAMixin</dfn></h2>
1358913589
[CEReactions] attribute DOMString? ariaValueNow;
1359013590
[CEReactions] attribute DOMString? ariaValueText;
1359113591
};
13592+
Element includes ARIAMixin;
1359213593
</pre>
1359313594

13594-
<p>Interfaces that include <code>ARIAMixin</code> must provide the following algorithms:</p>
13595-
13596-
<ul>
13597-
<li><dfn><code>ARIAMixin</code> getter steps</dfn>, which take the host interface instance, IDL attribute name, and content attribute name, and must return a string value; and</li>
13598-
<li><dfn><code>ARIAMixin</code> setter steps</dfn>, which take the host interface instance, IDL attribute name, content attribute name, and string value, and must return nothing.</li>
13599-
</ul>
13600-
13601-
<p>For every IDL attribute <var>idlAttribute</var> defined in <code>ARIAMixin</code>, on getting, it must perform the following steps:</p>
13595+
<p>For every IDL attribute <var>idlAttribute</var> defined in <code>ARIAMixin</code> when included on an element:</p>
1360213596

1360313597
<ol>
13604-
<li><p>Let <var>contentAttribute</var> be the ARIA content attribute determined by looking up <var>idlAttribute</var> in the ARIA Attribute Correspondence table.</p></li>
13598+
<li><p>Let <var>contentAttributeName</var> be the local name of the ARIA content attribute determined by looking up <var>idlAttribute</var> in the ARIA Attribute Correspondence table.</p></li>
1360513599

13606-
<li><p>Return the result of running the <a><code>ARIAMixin</code> getter steps</a>, given this, <var>idlAttribute</var>, and <var>contentAttribute</var>.</p></li>
13600+
<li><p><var>idlAttribute</var> must [=reflect=] <var>contentAttributeName</var> and support {{ElementInternals}}.</p></li>
1360713601
</ol>
1360813602

13609-
<p>Similarly, on setting, it must perform the following steps:</p>
13610-
13611-
<ol>
13612-
<li><p>Let <var>contentAttribute</var> be the ARIA content attribute determined by looking up <var>idlAttribute</var> in the ARIA Attribute Correspondence table.</p></li>
13613-
13614-
<li><p>Run the <a><code>ARIAMixin</code> setter steps</a>, given this, <var>idlAttribute</var>, <var>contentAttribute</var>, and the given value.</p></li>
13615-
</ol>
13616-
13617-
<p class="note">This very general framework is motivated by the desire for different host interfaces, such as <code>Element</code> and <code>ElementInternals</code>, to give these IDL attributes different behaviors. The alternative is requiring each host interface to duplicate the IDL attributes independently, so that they can specify independent behaviors, but that comes with a high risk of them getting out of sync.</p>
13603+
<p class="note">In practice, this means that, e.g., the <code>role</code> IDL attribute on <code>Element</code> reflects the <code>role</code> content attribute; the <code>ariaValueMin</code> IDL attribute reflects the <pref>aria-valuemin</pref> content attribute; etc. Ambiguity clarifications (such as <code>ariaPosInSet</code>) are listed in <a href="#idl_attr_exceptions">IDL Attribute Name Notes or Exceptions</a>.</p>
1361813604
</section>
1361913605

1362013606
<section id="accessibilityroleandproperties-correspondence" class="normative" data-dfn-for="ARIAMixin" data-link-for="ARIAMixin">
@@ -13698,24 +13684,6 @@ <h3>IDL Attribute Name Notes or Exceptions</h3>
1369813684
</section>
1369913685
</section>
1370013686

13701-
<section id="idl_element">
13702-
<h2><code>ARIAMixin</code> Mixed in to <code>Element</code></h2>
13703-
13704-
<p>User agents MUST include <code>ARIAMixin</code> on <code>Element</code>:</p>
13705-
13706-
<pre class="idl" data-cite="webidl">
13707-
Element includes ARIAMixin;
13708-
</pre>
13709-
13710-
<p>For <code>Element</code>:</p>
13711-
<ul>
13712-
<li><p>The <a><code>ARIAMixin</code> getter steps</a> given <var>element</var>, <var>idlAttribute</var>, and <var>contentAttribute</var> are to return the result of the getter algorithm for <var>idlAttribute</var> <a href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflect">reflecting</a> <var>contentAttribute</var> on <var>element</var>.</p></li>
13713-
<li><p>The <a><code>ARIAMixin</code> setter steps</a> given <var>element</var>, <var>idlAttribute</var>, <var>contentAttribute</var>, and <var>value</var> are to perform the setter algorithm for <var>idlAttribute</var> <a href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflect">reflecting</a> <var>contentAttribute</var> on <var>element</var>, given <var>value</var>.</p></li>
13714-
</ul>
13715-
13716-
<p class="note">In practice, this means that, e.g., the <code>role</code> IDL on <code>Element</code> reflects the <code>role</code> content attribute; the <code>ariaValueMin</code> IDL attribute reflects the <code>aria-valuemin</code> content attribute; etc.</p>
13717-
</section>
13718-
1371913687
<section class="informative" id="idl_example_usage">
1372013688
<h2>Example IDL Attribute Usage</h2>
1372113689
<p>The primary purpose of ARIA IDL attribute reflection is to ease JavaScript-based manipulation of values. The following examples demonstrate its usage.</p>

0 commit comments

Comments
 (0)