How do I use the Tab key to navigate to a button or select element in Firefox? I've tried setting the tabindex
attribute to no avail. I'm on a Mac.
Asked
Active
Viewed 1.0k times
0

TylerH
- 20,799
- 66
- 75
- 101

Jonathan Hawkes
- 953
- 2
- 12
- 24
-
1Do you by chance happen to have a global CSS reset `{outline: none}` or `{outline: 0}`? If so, you won't see the focus outline but the focus is there. – Chetan S Jan 20 '10 at 23:34
-
Are you referring to a – Mark Aug 17 '12 at 12:08
3 Answers
6
If you're using a Mac, you need to open the Keyboard
preference panel, switch to the Keyboard Shortcuts
tab and select:
"press Tab to move the keyboard focus between: (x) All controls"

Gareth
- 133,157
- 36
- 148
- 157
-
Yeah, it's a mac thing. Not possible to do it with Javascript I guess. – Jonathan Hawkes Jun 24 '10 at 06:49
0
If you know of a (preferably simple) page where this works, you might want to take a look at their source.
Also, are you sure your HTML document has the keyboard focus when trying? I'm asking because I seem to recall I can navigate to such elements with TAB in plain HTML pages where I did nothing to indicate tab order or similar.

Bandi-T
- 3,231
- 1
- 20
- 15
-1
Please post your code. Here's an example from the w3c (http://www.w3.org/TR/html401/interact/forms.html#h-17.10):
<FORM action="..." method="post">
<P>
<FIELDSET>
<LEGEND>Personal Information</LEGEND>
Last Name: <INPUT name="personal_lastname" type="text" tabindex="1">
First Name: <INPUT name="personal_firstname" type="text" tabindex="2">
Address: <INPUT name="personal_address" type="text" tabindex="3">
...more personal information...
</FIELDSET>
<FIELDSET>
<LEGEND>Medical History</LEGEND>
<INPUT name="history_illness"
type="checkbox"
value="Smallpox" tabindex="20"> Smallpox
<INPUT name="history_illness"
type="checkbox"
value="Mumps" tabindex="21"> Mumps
<INPUT name="history_illness"
type="checkbox"
value="Dizziness" tabindex="22"> Dizziness
<INPUT name="history_illness"
type="checkbox"
value="Sneezing" tabindex="23"> Sneezing
...more medical history...
</FIELDSET>
<FIELDSET>
<LEGEND>Current Medication</LEGEND>
Are you currently taking any medication?
<INPUT name="medication_now"
type="radio"
value="Yes" tabindex="35">Yes
<INPUT name="medication_now"
type="radio"
value="No" tabindex="35">No
If you are currently taking medication, please indicate
it in the space below:
<TEXTAREA name="current_medication"
rows="20" cols="50"
tabindex="40">
</TEXTAREA>
</FIELDSET>
</FORM>

user250120
- 901
- 1
- 6
- 8