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

[macosx] Accessible JTables always reported as empty

    Details

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      OS X 10.10.4
      14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      JTables are always reported as empty by VoiceOver on OS X.
      For example, when focusing a table with VoiceOver enabled, VoiceOver says "<accessible table name>, empty , table has keyboard focus", even if the table is not empty. When navigating through the table, none of the table contents is ever read.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the below example on OS X. Enable Voiceover (Cmd-F5).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The table should be reported as containing some rows and columns. When navigating the table the contents of cells, rows, or columns (as appropriate) should be read.
      ACTUAL -
      In the below example, VoiceOver reads:
      "Java, AccessibilityTest, Window, accessible table, empty , table has keyboard focus."
      Click or use the keyboard to navigate the table. VoiceOver says nothing.

      REPRODUCIBILITY :
      This bug can be reproduced always.

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

      public class Main {
          private static void runTest() {
              JFrame frame = new JFrame("AccessibilityTest");
              frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

              JTable table = new JTable(new String[][] {{"a", "b"},{"c", "d"}},
                      new String[] {"foo", "bar"});
              table.getAccessibleContext().setAccessibleName("accessible table");
              frame.getContentPane().add(new JScrollPane(table));
              frame.pack();
              frame.setVisible(true);
          }

          public static void main(String[] args) {
              SwingUtilities.invokeLater(Main::runTest);
          }
      }

      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: