This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23347 - Element.tabIndex default on non-natively-focusable elements should be undefined rather than -1
Summary: Element.tabIndex default on non-natively-focusable elements should be undefin...
Status: RESOLVED MOVED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 editorial
Target Milestone: ---
Assignee: Charles McCathieNevile
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y, a11y_focus
Depends on:
Blocks:
 
Reported: 2013-09-24 22:32 UTC by James Craig
Modified: 2016-04-22 18:16 UTC (History)
6 users (show)

See Also:


Attachments

Description James Craig 2013-09-24 22:32:29 UTC
This sentence is not accurate. For example, if you set an explicit tabindex="-1" on a SPAN element, it is not user-focusable in sequential tab order, but it is user-focusable if clicked with a mouse. As such, there is a difference between Element.tabIndex being equal to -1, and Element.tabIndex being undefined, and the reflected DOM attribute defaults should account for that.


http://www.w3.org/html/wg/drafts/html/master/single-page.html#attr-tabindex

"The tabIndex IDL attribute must reflect the value of the tabindex content attribute. Its default value is 0 for elements that are focusable and −1 for elements that are not focusable."


Suggested change: (changed "-1" to "undefined")

"The tabIndex IDL attribute must reflect the value of the tabindex content attribute. Its default value is 0 for elements that are focusable and undefined for elements that are not focusable."
Comment 1 James Craig 2013-09-25 17:35:57 UTC
Might also need a change to the data type to support this distinction.

Currently:
"The tabindex attribute, if specified, must have a value that is a valid integer."
Comment 2 Charles McCathieNevile 2015-06-12 14:47:22 UTC
This looks like part of the mess that is focus management and keyboard interaction :(
Comment 3 Charles McCathieNevile 2016-04-14 22:28:10 UTC
Moved to Github: https://github.com/w3c/html/issues/199

Note that at least Firefox, Safari and Blink try to do what they are told, but have bugs.
Comment 4 Arron Eicholz 2016-04-22 18:16:36 UTC
HTML5.1 Bugzilla Bug Triage: Moved, this issue has been moved to the Github https://github.com/w3c/html/issues/199

If this resolution is not satisfactory, please copy the relevant bug details/proposal into the issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!