Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6351709

JAWS does not read mnemonic on JMenus and JMenuItems

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 2.0
    • 5.0
    • client-libs

      FULL PRODUCT VERSION :
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Access Bridge 1.2

      A DESCRIPTION OF THE PROBLEM :
      Jaws is not reading menu mnemonics in JMenu and JMenuItems. This looks similar to bug 4888614 which is duped against a fixed record, but this still doesn't work.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run the supplied example code.
      Hit alt-F.
      Hit down arrow.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I expect that JAWS would read which key is associated with the menuitem.
      ACTUAL -
      JAWS only reads the menu string.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;

      public class TestMenu {

          public TestMenu()
          {
              JFrame frame = new JFrame("Text Menus");
              JTextArea textArea = new JTextArea();
              textArea.setLineWrap(false);
              String s = new String("This is a text area\ninside of a JFrame.");
              textArea.setText(s);
              textArea.setDragEnabled(true);
              textArea.getAccessibleContext().setAccessibleName("text area");
              JScrollPane sp = new JScrollPane(textArea);
              frame.getContentPane().add(sp);
              JMenuBar menubar = new JMenuBar();
              menubar.getAccessibleContext().setAccessibleName("menubar");
              JMenu fileMenu = new JMenu("File");
              fileMenu.getAccessibleContext().setAccessibleName("file menu");
              fileMenu.setMnemonic('F');
              JMenuItem m1 = new JMenuItem("Menu Item 1");
              m1.setMnemonic('M');
              m1.getAccessibleContext().setAccessibleName("Menu Item 1");

              JMenuItem m2 = new JMenuItem("Menu Item 2");
              m2.setMnemonic('I');
              m2.getAccessibleContext().setAccessibleName("Menu Item 2");

              JMenuItem m3 = new JMenuItem("Menu Item 3");
              m3.setMnemonic('u');
              m3.getAccessibleContext().setAccessibleName("Menu Item 3");
              fileMenu.add(m1);
              fileMenu.add(m2);
              fileMenu.addSeparator();
              fileMenu.add(m3);

              JMenu editMenu = new JMenu("Edit");
              editMenu.getAccessibleContext().setAccessibleName("edit menu");
              editMenu.setMnemonic('E');
              JMenuItem m4 = new JMenuItem("Menu Item 1");
              m4.setMnemonic('M');
              m4.getAccessibleContext().setAccessibleName("Menu Item 1");
              JMenuItem m5 = new JMenuItem("Menu Item 2");
              m5.setMnemonic('I');
              m5.getAccessibleContext().setAccessibleName("Menu Item 2");
              JMenuItem m6 = new JMenuItem("Menu Item 3");
              m6.setMnemonic('u');
              m6.getAccessibleContext().setAccessibleName("Menu Item 3");
              editMenu.add(m4);
              editMenu.add(m5);
              editMenu.addSeparator();
              editMenu.add(m6);

              menubar.add(fileMenu);
              menubar.add(editMenu);


              frame.setJMenuBar(menubar);

              frame.getAccessibleContext().setAccessibleName("the frame");
              frame.setSize(250,300);
              frame.setLocation(300,300);
              frame.setVisible(true);

          }

          public static void main(String[] args)
          {
              new TestMenu();
          }


      }
      ---------- END SOURCE ----------

            lmonsantsunw Lynn Monsanto (Inactive)
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: