Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Tab to all form elements in Mozilla Web Browsers
Here's a useful tip to keyboard enthusiasts who use Mozilla. If you've used Windows versions of Mozilla (and most other browsers for that matter), you know that you can tab through all of the input elements on a web page - links, forms, checkboxes, radio buttons, etc. With the Mac version of Mozilla, though, you can only tab through text entry fields on a form - drop down lists, buttons, links, etc are all inaccessible via the keyboard. Even if you set "Any control" in the Keyboard Preferences pane, you still can't access these other fields. Fortunately, there is an answer - if you add the following to your user.js file:
  // Enable tabbing to all fields in a form,
// as well as links.
user_pref("accessibility.tabfocus", 7) ;
Restart Mozilla, and you will now be able to access all links and form controls by just tabbing through the selections. The user.js file can be found in ~/Library -> Mozilla -> Profiles -> LOGIN -> RANDOM.slt, where LOGIN is your profile name, and RANDOM is a random string of 8 characters assigned by Mozilla.

[Editor's note: You may not have a user.js file if you haven't added any of your own customizations yet; just create it if it doesn't exist. This hint worked perfectly on Mozilla 1.2b when I tested it.]
    •    
  • Currently 1.25 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[8,086 views]  

Tab to all form elements in Mozilla | 10 comments | Create New Account
Click here to return to the 'Tab to all form elements in Mozilla' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Doesn't seem to work in Chimera
Authored by: greenergrad on Dec 02, '02 12:38:31PM
I tried this in Chimera 0.6 (build 2002112604) and it didn't work.

BTW, the file location in Chimera is ~Library/Application Support/Chimera/Profiles/Default/RANDOM.slt/user.js.

[ Reply to This | # ]
A few extra points
Authored by: wolfy on Dec 02, '02 12:59:58PM

If you have to create a user.js file, make sure you use something that creates plain text files. I'm not certain, but I think Mozilla may require UNIX newlines, so you probably want to use a UNIX editor like vi or emacs, or BBEdit set to create the file with UNIX newlines.

To undo the effects of this change, go back into user.js, and change the 7 to a 1. (simply deleting it won't work).

Use a value of 3 if you don't want to tab through links, but still want to visit all form elements.



[ Reply to This | # ]
A few extra points
Authored by: greenergrad on Dec 02, '02 05:58:04PM
If you have to create a user.js file, make sure you use something that creates plain text files. I'm not certain, but I think Mozilla may require UNIX newlines, so you probably want to use a UNIX editor like vi or emacs, or BBEdit set to create the file with UNIX newlines.
My user.js is set to UNIX format in BBEdit.
Use a value of 3 if you don't want to tab through links, but still want to visit all form elements.
Hmm. This doesn't seem to work on my system. Can anyone confirm that this works with Chimera 0.6?

[ Reply to This | # ]
A few extra points
Authored by: wolfy on Dec 02, '02 06:46:28PM

Hmm... maybe I should have tried that "3" value before saying something about it. I didn't try it, just going on the short doc I have on this.



[ Reply to This | # ]
Hmm...
Authored by: frankko on Dec 02, '02 02:20:54PM
I've never once added/changed this pref, and every default installation of Mozilla or Chimera I've used, form elements/links/everything have been accessible via the tab key. I wonder why it was like that for me but, apparently, not for others? Whatever. I'm glad it can be controlled. If folks haven't seen it, this page has a bunch of other customizations: http://www.mozilla.org/unix/customizing.html#prefs It's especially handy for Chimera users, as many items that are in Mozilla's pref pane hasn't been implemented in Chimera yet. Case in point: My favorite new one (new to me, anyway): // Override popping up new windows on target=anything. // This is now accessible in the prefs dialog, under Advanced|Scripts&Windows. user_pref("browser.block.target_new_window", true); That one, at least, works in Chimera 0.6. Not sure about the rest. Make sure you read the notes at the beginning of the section. It has important information about canceling certain items added via a user.js file.

[ Reply to This | # ]
More details please...
Authored by: orca498 on Dec 03, '02 10:12:51PM
I really miss being able to tab through pages...

The user.js file can be found in ~/Library -> Mozilla -> Profiles -> LOGIN -> RANDOM.slt, where LOGIN is your profile name, and RANDOM is a random string of 8 characters assigned by Mozilla.

Do all the above directories need to be present for this to work? I created a user.js file and put it in ~/Library -> Mozilla -> . I don't have any of the other directories, or files in my Mozilla folder. I tried creating the user.js file and placing it in ~/Library -> Mozilla -> , and then restarting, but it didn't work.

where LOGIN is your profile name is this a file I would need to create?

and RANDOM is a random string of 8 characters assigned by Mozilla is it possible to get these numbers somewhere?

[ Reply to This | # ]
More details please...
Authored by: wolfy on Dec 04, '02 09:33:17AM

I don't see how you don't have the entire directory structure, unless you're using some really ancient version of Mozilla from before they decided on the current directory structure. Make sure you're looking in ~/Library (that is, the Library folder in your home directory, not /Library or /System/Library).

Try looking for the prefs.js file with:

locate prefs.js

from the Terminal, just in case Mozilla has for some reason put its setup files someplace weird.



[ Reply to This | # ]
More details please...
Authored by: orca498 on Dec 05, '02 03:55:12PM
Thank you very much... You'll never guess!

The Governemt has confirmed that do to operator error the plane was lost. There were no survivors...

I was in the wrong Library.


Thanks again!!

[ Reply to This | # ]
Worked in Chimera for me
Authored by: Anonymous on Dec 10, '02 09:04:35PM

editing the user.js file under chimera 0.6 (build 2002110415) seemed to work for me. it is notable that you must have focus on the page area in order for this to work if you have tab to all controls turned on in the keyboard pref pane. if you have this on and focus in in the address bar, it will tab only to other navigation buttons.



[ Reply to This | # ]
Worked in Chimera for me
Authored by: wolfy on Dec 11, '02 12:59:53AM

That's certainly not the case in Mozilla, where you can from the location bar to anywhere on the page (but not to the navigation elements in the toolbars).



[ Reply to This | # ]