[keyboard]

Keyboard © jaqian / CC

Firefox toolbar buttons are not in the tab order; there is no way to reach them with the keyboard. This is an accessibility problem, because everything should be navigable with the keyboard. Actually, that’s a misstatement. It is more correct to say that every function must be possible with the keyboard. It is acceptable to duplicate each button’s functionality in menus, which are fully keyboard navigable. This is the route Firefox has historically taken, but it leads to bugs like Bug 287743 – Firefox “back” and “forward” toolbar submenus not keyboard accessible. Technically speaking, the History menu does not offer the same functionality of the back/forward submenus, because the History menu is global across tabs while the button menus are tab-specific.

I have lobbied — unsuccessfully — for a simple solution: add all toolbar buttons to the tab order. There are some good arguments against this: the change would annoy people who have “muscle memory” for the current tab order. Example: moving from the location bar to the search box, which would suddenly take two tabs instead of one, because the “Go” button would now be tabbable. (You can always get to the search box with Ctrl-K.) Also, tabbing through all visible bookmarks in the bookmark toolbar would get old rapidly, until you learned that you could bypass all of them and put focus directly on the content pane with F6. But people would complain anyway.

And speaking of F6, it moves focus to the first focusable element within a frame (which includes HTML frames, but also the chrome UI acts as its own frame), which means that pressing F6 from within the web page would suddenly focus the back button instead of the location bar, because the location bar would no longer be the first focusable element in the chrome frame. So it’s a tradeoff of enabling new functionality and breaking old functionality, and for reasons not worth going into, it would be relatively difficult to maintain the default (albeit somewhat accidental) behavior of “F6-focuses-location-bar” while adding the new behavior of “Tab includes toolbar buttons.”

There are also smaller technical issues. What happens if you move focus to a button and select it, and the act of selecting it causes it to become disabled? This can easily happen with the Back and Forward buttons. The correct answer is “automatically advance focus to the next focusable element”, but Firefox has some problems actually doing that because it was designed with the assumption that that would never happen.

Finally, there is the social dimension. Lots of people want Firefox to work differently than it does. The standard answer to people who want to fundamentally change Firefox’s behavior is “write an extension.” That’s a good answer, and it’s meant to keep Firefox from turning into… well, into Seamonkey. I think this case is an exception, but I suppose everyone thinks their case is an exception.

“Write an extension,” they said. So I did.

Tabbable Toolbars 0.1

§

Eleven comments here (latest comments)

  1. I find some other browsers that are derived from the same base have annoying issues too. For instance, I am used to CTRL+L to select the address bar, so that I can enter the next site. In K-Meleon (and Kazehakase), that does not work. Drives me totally batty, because CTRL+L even works in Opera!

    There are two extensions that I feel should be there by default: adblock and noscript. Adblock generally does what it is supposed to do. Adblock Plus gets more of the ads, but often causes conflicts with other extensions (or just does not work if a non-administrator tries to install it). Likewise, I think these things should be built into other Gecko-based browsers as well.

    — W^L+ #

  2. > (You can always get to the search box with Ctrl-K.)
    Thanks for that tip.

    > until you learned that you could bypass all of them and put focus directly on the content pane with F6
    To me it seems that F6 put focus on the location bar not the content area. Shift-F6 seems to toggle focus between the location bar and the content area, but Ctrl-L/K seems far easier to hit than Shift-F6. Looking at the key placement on a qwerty-keyboard, it seems Ctrl-M should go to the content area (and Ctrl-L/K should be swapped).

    — Anonymous #

  3. I love F-key key equivs. They’re so intuitive! Just like ctrl-L[ocation bar], shift-F6[ontent pane] feels natural. And it exercises your hand at the same time!

    — nevyn #

  4. Ctrl-K was a great tip. Is there some good resource of all these shortcuts, I’ve known only ctrl-F (find) before…

    — Perla #

  5. Excellent stuff. One minor thing: doesn’t currently work for dropdown menu type buttons (e.g. webdev toolbar buttons).

    — patrick h. lauke #

  6. Accessify: latest news / Make Firefox’s toolbar buttons keyboard accessible (pingback)
  7. Patrick: tab to the dropdown menu button and press F4.

    — Mark #

  8. Perla: Help menu -> Help Contents -> Keyboard Shortcuts lists the most common ones. http://www.mozilla.org/support/firefox/keyboard lists (virtually) all of them. You can get an extension like keyconfig ( http://forums.mozillazine.org/viewtopic.php?t=72994 ) to add or change keyboard shortcuts.

    You should also read Help menu > Help Contents -> Accessibility Features, which I wrote for Firefox 2, and then read its expanded online counterpart, http://kb.mozillazine.org/Accessibility_features_of_Firefox , which documents a bunch of hidden features that got cut from the local version of the documentation.

    — Mark #

  9. ah, i stand corrected. great work mark.

    — patrick h. lauke #

  10. Thanks for the extension! Here is a bug report: If I activate a menu on the bookmarks toolbar (a folder or feed) by tabbing to it and hitting F4, and then point the mouse at another folder or feed on the bookmarks toolbar, it activates on mouseover (and the tabbed-to menu deactivates), and then if I move the mouse up onto the location bar it remains open, and when I hit F4 again the tab-focused menu reopens… and I now have two menus open simultaneously (and the arrow keys navigate in both). This is in Firefox on edgy-ppc, not that it should matter.

    On the subject of “every function must be possible with the keyboard”, how does one access contextual menus without the mouse?

    — Leif #

  11. > how does one access contextual menus without the mouse?

    Shift-F10. This actually works in most other applications too.

    Thanks for the bug report. I’ll look into it.

    — Mark #

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



§

firehosecodeplanet

© 2001–9 Mark Pilgrim