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

Define what tabIndex returns when the tabindex attribute is not set #4754

Merged
merged 6 commits into from
Jul 9, 2019
Merged
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -73709,8 +73709,10 @@ END:VCARD</pre>

<p>The <dfn><code data-x="dom-tabIndex">tabIndex</code></dfn> IDL attribute must
<span>reflect</span> the value of the <code data-x="attr-tabindex">tabindex</code> content
attribute. Its default value is 0 for elements that are focusable and &#x2212;1 for elements that
are not focusable.</p>
attribute. If the <code data-x="attr-tabindex">tabindex</code> content attribute is not set, then
Copy link
Member

Choose a reason for hiding this comment

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

Default value is a term of art that we need to keep using. (The definition of reflect says "...if the attribute is absent, the default value must be returned instead".) I will push a fixup.

it must return 0 if the element is either an <code>input</code>, <code>button</code>,
<code>a</code>, <code>textarea</code>, <code>select</code>, <code>iframe</code>, or
Copy link
Member

Choose a reason for hiding this comment

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

This should be a −, not a -. (Probably best to keep using the entity reference.)

One other thing I suspect is that in Firefox it might be 0 for link elements as well, given that it treats them as links generally.

Copy link
Member

Choose a reason for hiding this comment

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

Good idea. https://boom-bath.glitch.me/tabindex.html updated and shows link is -1 in all browsers, so it doesn't need to be on this list. But this prompted me to do a bit more investigation and I found option and optgroup.

Copy link
Member

Choose a reason for hiding this comment

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

Er, actually my test had a typo. Those are still -1. But, summary is 0. Sigh.

<code>area</code> element, and must return -1 otherwise.</p>

</div>

Expand Down