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

aria-disabled and descendant elements #1467

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11329,8 +11329,24 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<div class="state-description">
<p><a>Indicates</a> that the <a>element</a> is <a>perceivable</a> but disabled, so it is not editable or otherwise <a>operable</a>. See related <sref>aria-hidden</sref> and <pref>aria-readonly</pref>.</p>
<p>For example, irrelevant options in a radio group may be disabled. Disabled elements might not receive focus from the tab order. For some disabled elements, applications might choose not to support navigation to descendants. In addition to setting the <sref>aria-disabled</sref> attribute, authors SHOULD change the appearance (grayed out, etc.) to indicate that the item has been disabled.</p>
<p>The <a>state</a> of being disabled applies to the element with aria-disabled and all focusable descendant elements of the element on which the <sref>aria-disabled</sref> <a>attribute</a> is applied.</p>
<p class="note">While <sref>aria-disabled</sref> and proper scripting can successfully disable an element with role <rref>link</rref>, fully disabling a host language equivalent can be problematic. Authors are advised not to use <sref>aria-disabled</sref> on elements that cannot be disabled through features of the host language alone.</p>
<p>The <a>state</a> of being disabled applies to the element on which <sref>aria-disabled</sref> <a>attribute</a> is specified and any descendant elements which support the disabled state, with the exception of elements with a <rref>link</rref> role.</p>
<p>For example, in the following markup snippet a <rref>group</rref> has been marked as disabled using the <sref>aria-disabled</sref> attribute. The descendant elements with the <rref>textbox</rref> and <rref>checkbox</rref> roles inherit the disabled state from the ancestor <code>group</code>. The elements with the explicit and implicit role of <rref>link</rref> do not inherit the disabled state.</p>
<pre class="example highlight">
&lt;div role="group" aria-disabled="true" aria-labelledby="..."&gt;
...
<span id="ex">Coupon Code</span>
<div role="textbox" aria-labelledby="ex"></div>
<span role="link" tabindex="0">Find out how to get a code</span>
...
<div role="checkbox" tabindex="-1">
I agree to the Terms and Conditions of which I likely did not read.
</div>
...
<a href="...">Terms and Conditions</a>
...
&lt;/div&gt;
</pre>
<p class="note">While <sref>aria-disabled</sref> and proper scripting can successfully disable an element with role <rref>link</rref>, fully disabling a host language equivalent can be problematic. Authors are advised not to use <sref>aria-disabled</sref> on elements that cannot be disabled through features of the host language alone.</p>
<p class="note" title="Usage on columnheader, rowheader and row">While <sref>aria-disabled</sref> is currently supported on <rref>columnheader</rref>, <rref>rowheader</rref>, and <rref>row</rref>, in a future version the working group plans to prohibit its use on elements with any of those three roles except when they are in the context of a <rref>grid</rref> or <rref>treegrid</rref>.</p>
<p class="note">This state is being deprecated as a global state in ARIA 1.2. In future versions it will only be allowed on roles where it is specifically supported.</p>
</div>
Expand Down