Page 1 of 1

Is there a standards-based alternate to tabindex="-1&qu

Posted: Thu Apr 27, 2006 9:57 am
by themurph
Because I hate when my ff validation icon comes up as anything but a checkbox in a green circle 8O

Posted: Thu Apr 27, 2006 11:20 am
by RobertGonzalez
Not that I'm aware of (at least not for HTML). Apparently XHTML allow any value to be entered as a tab index, even strings. But from what I have found through Googling, there doesn't appear to be a compliance confiorming method to achieve a negative tabindex value.

Posted: Thu Apr 27, 2006 12:14 pm
by Noobie
Why not just avoid tabindex all together? If your site is logically laid out then they're unecessary and can actually be more of a hindrance to accessibility than a help.

Posted: Thu Apr 27, 2006 1:59 pm
by RobertGonzalez
Negative tab indices are used by developers to remove form field elements from the tab sequence. Essentially it limits the users tabbing interaction to a select group of form fields. Of course, any user that uses a mouse would still be able to get to the form field, but that is a different, usability type, discussion.

Posted: Thu Apr 27, 2006 2:21 pm
by themurph
Right or wrong (probably wrong), I have gotten in the habit of using readonly textboxes styled to
look exactly like other plain text on a page so I can not only dynamically update that text via js,
but have it display to the user immediately, as well as being able to post it as a regular form var.

I'm sure there are better ways to do it, but once you get used to something...

Historically I set readonly and tabindex="-1" on these boxes so the user doesn't
end up focusing on one (or editing it) when tabbing through the form.

Posted: Thu Apr 27, 2006 2:58 pm
by RobertGonzalez
My typical process is if the user doesn't need to touch it, then there is no use showing it. If it has to be displayed, but still not messed with, I will display it as text instead of a form field element. As a last resort, if I have to show the form field but keep people out of the field, I will set some javascript to immediately change the focus of the field to another field as soon as the field has focus (clicked in or tabbed to). I really don't like relying on the last alternative because of the browser reliance implications.