Closed Bug 145297 Opened 23 years ago Closed 23 years ago

input control tabindex="-1" ignored

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

VERIFIED DUPLICATE of bug 56809

People

(Reporter: stricq, Assigned: joki)

References

()

Details

(Keywords: qawanted)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510 BuildID: 2002051006 The field labled Total Hours has tabindex="-1" set in the input control. However, the field is still in the tab order. The HTML docs state that negative values for tabindex leave the form control out of the tabbing order. Reproducible: Always Steps to Reproduce: 1. Load a page with a form that uses tabindex="-1" in a control 2. Tab through the form's controls. Actual Results: The control with tabindex="-1" always received focus. Expected Results: The control with tabindex="-1" should have been skipped. <input type="text" name="TotalHours" value="4" readonly size="8" tabindex="-1">
> The HTML docs state that negative values for tabindex leave the form control out > of the tabbing order. Which docs state this? http://www.w3.org/TR/html401/interact/forms.html#adef-tabindex merely says that tabindex must be "must be a number between 0 and 32767". Thus negative values are simply illegal and behavior for them is undefined...
Mail from Douglas: Ok, I realize this is not the W3, but I am reading the "HTML Programmer's Reference", Osborne/McGraw-Hill, by Thomas A. Powell and Dan Whitworh. FWIW, and you probably hate getting this kind of stuff, but it works in IE6. If this is just an IE thing, the book does not say so, and the authors have taken great pains to ensure that each browser and each browser's version's behavior is documented.
some quick testing shows: 1) NS4 does not support tabindex at all 2) Opera 5 does not support tabindex at all So the only browser supporting tabindex at the time that book was written was IE, unless it was written late enough that NS6 was out. Thus this business of skipping tabindex="-1" does indeed seem to be an IE-only thing. The prose at the url I cited _could_ be twisted to the IE interpretation, since it never mentions elements with negative tabindex in the list of things tabbing navigates. But since negative tabindex is also invalid, I would expect a negative tabindex to have the same effect as no tabindex at all.
Keywords: qawanted
QA Contact: tpreston → ian
Per HTML, behaviour is undefined for invalid documents, so for all the spec cares we could be making negative tab index numbers reboot the machine and that would still be valid... Ahem.
This is an event state anager issue.
Assignee: rods → joki
Component: HTML Form Controls → Event Handling
QA Contact: ian → rakeshmishra
*** This bug has been marked as a duplicate of 56809 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
QA Contact: rakeshmishra → trix
verifying dupe
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.