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 11535 - tabIndex IDL default is −1 for elements that are not focusable, but if the tabindex value is negative integer, the element can still be focused.
Summary: tabIndex IDL default is −1 for elements that are not focusable, but if the ta...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-11 10:27 UTC by contributor
Modified: 2011-08-04 05:06 UTC (History)
6 users (show)

See Also:


Attachments
Testcase of current implementations and reason why the tabindex default for non-focusables should not be -1 (831 bytes, text/html)
2010-12-11 11:45 UTC, henry.fai.hang.chan
Details

Description contributor 2010-12-11 10:27:56 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#sequential-focus-navigation-and-the-tabindex-attribute

Comment:
tabIndex IDL default is −1 for elements that are not focusable, but if the
tabindex value is negative integer, the element can still be focused. 

Posted from: 203.218.234.217
Comment 1 henry.fai.hang.chan 2010-12-11 11:38:53 UTC
Statement 1:
"If the [tabindex attribute] value is a negative integer

    The user agent must allow the element to be focused, but should not allow the element to be reached using sequential focus navigation."

Statement 2:
"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."

contradiction?

it would be better if non-focusable elements had an tabIndex IDL attribute as NULL instead:

NULL: cannot be focused (and cannot be in document.activeElement)
NEGATIVE: can be focused, not in sequence
0: can be focused, append to end of sequence
POSITIVE: can be focused, start of sequence

this better corresponds to the current behavior of Opera and firefox.
Comment 2 henry.fai.hang.chan 2010-12-11 11:45:50 UTC
Created attachment 937 [details]
Testcase of current implementations and reason why the tabindex default for non-focusables should not be -1
Comment 3 henry.fai.hang.chan 2010-12-11 11:48:07 UTC
sorry, forgot to add:
in testcase, click on the top two dives, and an alert will show the document.activeElement.
Comment 4 Ian 'Hixie' Hickson 2011-01-11 07:20:45 UTC
The tabindex content attribute and the tabindex IDL attribute are distinct; there's no contradiction, it just means that if you try to fetch the tabindex IDL attribute when its corresponding content attribute is not set, you don't get a useful value.

The attached test only tests the content attribute, not the IDL attribute.
Comment 5 Ian 'Hixie' Hickson 2011-02-16 09:33:22 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: see comment 4
Comment 6 Michael[tm] Smith 2011-08-04 05:06:10 UTC
mass-moved component to LC1