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

Tweak how accesskey on legend works #3987

Merged
merged 10 commits into from
Sep 6, 2018
Merged
34 changes: 20 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -56825,7 +56825,7 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
<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">AccessKey</span> of the command is the element's
<p>The <span data-x="command-facet-AccessKey">Access Key</span> of the command is the element's
<span>assigned access key</span>, if any.</p>

<p>The <span data-x="command-facet-HiddenState">Hidden State</span> of the command is true (hidden)
Expand Down Expand Up @@ -56891,7 +56891,7 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {

</ul>

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

<p>The <span data-x="command-facet-HiddenState">Hidden State</span> of the command is true (hidden)
Expand All @@ -56917,7 +56917,7 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
with <span data-x="strip and collapse ASCII whitespace">ASCII whitespace stripped and
collapsed</span>.</p>

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

<p>The <span data-x="command-facet-HiddenState">Hidden State</span> of the command is true (hidden)
Expand All @@ -56939,25 +56939,31 @@ 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 <span data-x="concept-command">defines a command</span> if all of the following are true:</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100 chars


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence doesn't work.

<ul>
<li><p>It has an <span>assigned access key</span>.</p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So multiple legend element children would be multiple commands?

Also, should there be a comma before "but"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They would, yes. Works in Safari/Chrome/Firefox/Edge.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still struggle with this. Perhaps make this a list:

A legend element defines a command if all of the following are true:

  • It has an assigned access key
  • It's a child of a fieldset element
  • Its parent has at least one descendant element that defines a command and is neither a label nor legend element.

<li><p>It is a child of a <code>fieldset</code> element.</p></li>
<li><p>Its parent has a descendant that <span data-x="concept-command">defines a command</span>
but is neither a <code>label</code> element nor a <code>legend</code> element.</p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and is neither?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"and is" -> "that is", if I understand correctly??

</ul>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would really benefit from an example or two


<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">AccessKey</span> of the command is the element's
<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
data-x="command-facet-DisabledState">Disabled State</span>, and <span
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comma before "but"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence also doesn't quite seem to work. Is it the first element command that is neither a label or legend element or is it the first element command, but only if it's not a label or legend element?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, this still seems ambiguous to me.

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>
facets of the first element in <span>tree order</span> that matches all of the following:</p>

<ul>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplication here is unfortunate. I'd suggest modifying the previous

Its parent has a descendant that defines a command that is neither a label element nor a legend element

to

Its parent has a descendant that defines a command and is neither a label element nor a legend element. This descendant, if it exists, is the something something.

Then you can say "are the same as the respective facets of the something something."

<li><p>It is a descendant of the parent of the <code>legend</code> element.</p></li>
<li><p>It is neither a <code>label</code> nor a <code>legend</code> element.</p></li>
<li><p>It <span data-x="concept-command">defines a command</span>.</p></li>
</ul>


<h5><dfn data-x="accesskey-command">Using the <code data-x="attr-accesskey">accesskey</code>
Expand All @@ -56979,7 +56985,7 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
the <span data-x="command-facet-Label">Label</span> is the <code>textContent</code> of the element
itself.</p>

<p>The <span data-x="command-facet-AccessKey">AccessKey</span> of the command is the element's
<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> of the command is true (hidden)
Expand Down