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

[macOS, Accessibility] VoiceOver: Missing or incorrect announcements on JTree

XMLWordPrintable

      ================
      Test environment
      ================
      Apple M1 Pro, macOS Ventura version 13.4

      java version "20" 2023-03-21
      Java(TM) SE Runtime Environment (build 20+36-2344)
      Java HotSpot(TM) 64-Bit Server VM (build 20+36-2344, mixed mode, sharing)

      openjdk version "21-ea" 2023-09-19
      OpenJDK Runtime Environment (build 21-ea+23-1988)
      OpenJDK 64-Bit Server VM (build 21-ea+23-1988, mixed mode, sharing)

      ================
      Test application
      ================
      SwingSet2.jar
      SwingSet2 can be downloaded from:
      https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html#swingset2

      ======================
      Test to reproduce bugs
      ======================
      1. On macOS, start VoiceOver (for example with shortcut Option-Command-F5).

      2. Start SwingSet2.jar with jdk-21 (or idk-20, which behaves the same).
      -> SwingSet2 window is displayed. The ToggleButton “JInternalFrame demo” has the keyboard focus.

      3. Press Left Arrow key once.
      -> The ToggleButton “JTree demo” on the very right side has the keyboard focus.

      4. Press Space key.
      -> The tab group “Tree Demo” is shown.

      5. Press Tab key twice.
      -> The panel with the tree inside has the keyboard focus.
      VoiceOver announces “Entering tree table, tree, table, No selection. You are currently on a table. To enter this table, press Control-Option-Shift-Down Arrow”.
      Bug #1: The announcement of a table is incorrect.
      Expected announcement: “Entering tree, tree, No selection. You are currently on a tree. To enter this tree, press Control-Option-Shift-Down Arrow”.

      6. Press Control-Option-Shift-Down Arrow.
      -> The root node "Music" has the keyboard focus, but is not selected.
      VoiceOver announces: "In tree table, No selection. Music, blank. You are currently on a text element, inside a table. To navigate the cells within a table, press Control-Option and then Up Arrow, Down Arrow, Left Arrow or Right Arrow. To exit this table, press Control-Option-Shift-Up Arrow."
      Same as Bug #1: The "table" announcement is incorrect, as this is a tree and not a table.
      Bug #2: VoiceOver does not announce the node state (expanded) and the root level (level 0). The meaning of the "blank" announcement is unclear.
      Expected announcement: "In tree, no selection, level 0, Music, expanded. ..."

      7. Press Control-Option-Down Arrow.
      -> The node item "Classical" has the keyboard focus.
      VoiceOver announces: "Classical, blank, level 1. ..."
      Bug #3: VoiceOver does not announce the state (collapsed) and the position (item no. of items within same level).
      Expected announcement: "Level 1, Classical, collapsed, 1 of 3. ..."

      8. Press Right Arrow key to open the node item.
      -> Nothing happens.
      Bug #4: It is not possible to open this node with Arrow right, which is the default key to expand tree node items.

      9. Press Control-Option-Space.
      -> The tree node "Classical" is expanded.
      Bug #5: VoiceOver announces nothing.
      Expected announcement: "Classical, expanded, 3 items."

      10. Press Control-Option-Space again.
      -> The tree node "Classical" is collapsed.
      Same as Bug #5: VoiceOver announces nothing.
      Expected announcement: "Classical, collapsed, 1 of 3."

      Restart SwingSet2 application to use default key commands in Tree:

      11. Close the SwingSet2 application and repeat the steps 1-5.
      -> The panel with the tree inside has the keyboard focus.

      12. Press Down Arrow key (which is the usual key to navigate downwards in the tree).
      -> The root node "Music" has the keyboard focus and is selected.
      VoiceOver announces: "Music, row. You are currently on a table. To enter this table, press Control-Option-Shift-Down Arrow."
      Bug #6: The VoiceOver announcement is confusing.
      Expected announcement: "In tree, level 0, Music, selected, expanded. ..."

      13. Press Down Arrow key.
      -> The node item "Classical" has the keyboard focus and is selected.
      VoiceOver announces: "Classical, row. You are currently on a text element, inside a table. To navigate the cells within a table, press Control-Option and then Up Arrow, Down Arrow, Left Arrow or Right Arrow. To exit this table, press Control-Option-Shift-Up Arrow."
      Similar to Bug #6. In addition, the "row" announcement is incorrect and the item level is missing.
      Expected announcement: See no. 7.

      14. Press Right Arrow key (which is the default key to expand tree node items via keyboard).
      -> The node "Classical" is expanded.
      VoiceOver announces: "row 1 expanded"
      Bug #7: VoiceOver announces the node item incorrect.
      Expected announcement: "Classical, expanded, 3 items".

      15. Press Left Arrow key (which is the default key to collapse tree node items via keyboard).
      -> The node "Classical" is collapsed.
      VoiceOver announces: "row 1 collapsed"
      Similar to Bug #7: VoiceOver announces the node item incorrect.
      Expected announcement: "Classical, collapsed, 1 of 3".


      Note 1: The mentioned bugs can be reproduced also with other Java applications containing a JTree.
      Note 2: The mentioned bugs basically do not occur with screen readers on Windows OS (tested with Jaws for Windows by Freedom Scientific, or NVDA by NVAccess).
      Note 3: Mentioning a bug on VoiceOver announcement does not mean that the issue is on VoiceOver’s side, rather it is the result of the issue and the cause of the issue needs to be found.

            abhiscxk Abhishek Kumar
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: