Accessibility/MenuButton Keyboard Navigation

From MozillaWiki
Jump to: navigation, search

Mozilla bug: bug 653226, originally started in bug 616136.

Problem: The menubutton widgets keyboard navigation model is very inconsistent, and many controls cannot even be reached. In addition, it does not generate the proper accessibility events that would be expected from such a widget.

  • In the example of the "Remember password" doorhanger notification, when tabbing through the doorhanger widget, focus lands on the "Save password" menu button first, upon pressing tab again, on a simple "Save password" button. Pressing Space on the first does not do anything, pressing Space on the second performs the action.
  • Don't Save, and Not Now are not accessible at all via the keyboard except for their mnemonic shortcuts, which the user may have missed.

Proposed solution

  • When user presses Space on the menu button widget itself, pop up a menu similar to when pressing the APPLICATIONS key on Windows, which brings up a context menu.
  • With focus inside that menu with all options present, allow the user to navigate up and down through the available options.
  • Allow pressing of Enter to select the desired option.
  • Make sure those options are menu items, not buttons, when they are communicated to accessibility, and that menu start/end events are fired.