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

Clarify when an element is disabled #1807

Merged
merged 1 commit into from
Apr 16, 2024
Merged
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
24 changes: 20 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4505,8 +4505,8 @@ <h2>Elements</h2>
<dl class=subcategories>
<dt><dfn data-lt="mutable form control element">Mutable form control elements</dfn>
<dd><p>Denotes [^input^] elements
that are <a>mutable</a> (e.g. that are not <a>read only</a> or <a>actually disabled</a>)
and whose [^input/type^] attribute
that are <a>mutable</a> (e.g. that are not <a>read only</a> or
<a>disabled</a>) and whose [^input/type^] attribute
is in one of the following states:

<ul class=brief>
Expand Down Expand Up @@ -4603,6 +4603,22 @@ <h3>Interactability</h3>
<li><p>Return the pair of (<var>x</var>, <var>y</var>).
</ol>

<p>An <a>element</a> |element| is <dfn>disabled</dfn> if the following steps
return true:

<ol>
<li><p>If |element| is an <a>option</a> element or |element| is an <a>optgroup</a> element:
<ol>
<li><p>For each [=tree/inclusive ancestor=] |ancestor| of |element|:
<ol>
<li><p>If |ancestor| is an <a>optgroup</a> element or |ancestor| is a <a>select</a>
element, and |ancestor| is [=actually disabled=], return true.
</ol>
<li><p>Return false.
</ol>
<li><p>Return |element| is [=actually disabled=].
</ol>

<p>An <a>element</a> is <dfn>in view</dfn>
if it is a member of its own <a>pointer-interactable paint tree</a>,
given the pretense that its <a>pointer events are not disabled</a>.
Expand Down Expand Up @@ -5912,7 +5928,7 @@ <h4><dfn>Is Element Enabled</dfn></h4>
<p>Otherwise, let <var>enabled</var> to false
and jump to the last step of this algorithm.

<li><p>Set <var>enabled</var> to false if a form control is <a>actually disabled</a>.
<li><p>Set <var>enabled</var> to false if a form control is <a>disabled</a>.

<li><p>Return <a>success</a> with data <var>enabled</var>.
</ol>
Expand Down Expand Up @@ -6099,7 +6115,7 @@ <h4><dfn>Element Click</dfn></h4>

<li><p>Run the <a>focusing steps</a> on <var>parent node</var>.

<li><p>If <var>element</var> is not <a>actually disabled</a>:
<li><p>If <var>element</var> is not <a>disabled</a>:

<ol>
<li><p>[=fire an event|Fire=] an <a><code>input</code></a> event at <var>parent node</var>.
Expand Down
Loading