Skip to content

Commit

Permalink
Tweak how accesskey on legend works
Browse files Browse the repository at this point in the history
Fixes #3950.

Tests: TODO
  • Loading branch information
zcorpan committed Sep 3, 2018
1 parent 19fc441 commit b240785
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions source
Expand Up @@ -56939,25 +56939,42 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
<h5><dfn data-x="legend-command">Using the <code data-x="attr-accesskey">accesskey</code> attribute
on a <code>legend</code> element to define a command</dfn></h5>

<p>A <code>legend</code> element that has an <span>assigned access key</span> and is a child of a
<code>fieldset</code> element that has a descendant that is not a descendant of the
<code>legend</code> element and is neither a <code>label</code> element nor a <code>legend</code>
element but that <span data-x="concept-command">defines a command</span>, itself <span
data-x="concept-command">defines a command</span>.</p>
<p>A <code>legend</code> element that has an <span>assigned access key</span> and matches one of
the following conditions, itself <span data-x="concept-command">defines a command</span>.</p>

<ul>
<li>The <code>legend</code> is focusable</li>

<li>The <code>legend</code> is a child of a <code>fieldset</code> element that has a descendant
that element and is neither a <code>label</code> element nor a <code>legend</code> element but
that <span data-x="concept-command">defines a command</span></li>
</ul>

<p>The <span data-x="command-facet-Label">Label</span> of the command is the string given by the
element's <code>textContent</code> IDL attribute.</p>

<p>The <span data-x="command-facet-AccessKey">Access Key</span> of the command is the element's
<span>assigned access key</span>.</p>

<p>The <span data-x="command-facet-HiddenState">Hidden State</span>, <span
<p>If the <code>legend</code> element is focusable, then:</p>

<ul>
<li><p>The <span data-x="command-facet-HiddenState">Hidden State</span> is true (hidden) if the
element has a <code data-x="attr-hidden">hidden</code> attribute, and false otherwise.</p></li>

<li><p>The <span data-x="command-facet-DisabledState">Disabled State</span> of the command is
true if it or one of its ancestors is <span>inert</span>, and false otherwise.</p></li>

<li><p>The <span data-x="command-facet-Action">Action</span> is to run the <span>focusing
steps</span> for the element.</p></li>
</ul>

<p>Otherwise, the <span data-x="command-facet-HiddenState">Hidden State</span>, <span
data-x="command-facet-DisabledState">Disabled State</span>, and <span
data-x="command-facet-Action">Action</span> facets of the command are the same as the respective
facets of the first element in <span>tree order</span> that is a descendant of the parent of the
<code>legend</code> element that <span data-x="concept-command">defines a command</span> but is not
a descendant of the <code>legend</code> element and is neither a <code>label</code> nor a
<code>legend</code> element.</p>
<code>legend</code> element that <span data-x="concept-command">defines a command</span> but is
neither a <code>label</code> nor a <code>legend</code> element.</p>


<h5><dfn data-x="accesskey-command">Using the <code data-x="attr-accesskey">accesskey</code>
Expand Down

0 comments on commit b240785

Please sign in to comment.