Web Development
Web Developer Guidelines
Visual Design Recommendations

Checkpoint 1.8 - Java

Mnemonics (access keys) and accelerators (shortcuts) are used for essential functions of the applet/application

WCAG 1.0 Priority 3

WCAG Guideline 9. Design for device-independence.

Mnemonics are underlined characters that appear in menu items and on the buttons in some dialog boxes. A mnemonic can only be activated when the item is visible and does not require a modifier key (e.g., the user does not need to press the Alt key).

Accelerators are displayed on menu items or buttons in parentheses after the item's text [e.g., "Save (Ctrl+S)"]. The accelerator requires the use of a modifier key, and can be activated any time the application's window has the input focus.

Requirement

Mnemonics (access keys) and accelerators (shortcuts) are used for essential functions of the applet/application. All menu items must have mnemonics, so that keyboard-only use is practical.

Recommendation

Commonly used functionality should always be available via an accelerator. If a menu item is frequently used, add an accelerator.

Example of mnemonic use

menu = new JMenu();
menu.setText(resources.getString("fileMenu.label"));
menu.setMnemonic( resources.getString("fileMenu.mnemonic").charAt(0));

item = new JMenuItem();
...
item.setMnemonic( resources.getString("menuitem.file.new.mnemonic").charAt(0));
      

Example of accelerator use

item = new JMenuItem();
item.setAccelerator(KeyStroke.getKeyStroke(
                    resources.getString("menuitem.file.new.accelerator")));
      

Checking Tool

Review all menus to ensure they have mnemonics set for each menu item and they they all function. Review and test all accelerators.

Information Source

The original source of this information is located on the W3C web site  (www.w3.org/TR/WCAG10-TECHS/#gl-device-independence)

 

Back to top