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

Invisible controls are still accessible by screen readers.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u74, 9
    • Fix Version/s: 9
    • Component/s: javafx

      Description

      Any control or node that you hide via setVisible(false), still appears in the accessible tree and is visible and actionable by screen readers. See screen shot attached which shows a dialog containing a GridPane, populated like so:

                           Button button1 = new Button();
                           button1.setText("Button One");
                           
                           Button button2 = new Button();
                           button2.setText("Button Two");
       
                           gridPane.add(button1, 0, 0);
                           gridPane.add(button2, 0, 1);
                           
                           button2.setVisible(false);

      Although button2 cannot be tabbed to, if the screen reader has a mode where it can read out the dialog, it will read out invisible controls. It is also possible to action the control. For example, VoiceOver on Mac has the “Item Chooser” menu. Use CTRL+ALT+I to open the Item Chooser, scroll down to the invisible button and press ENTER to click the button.

      Note, this applies to controls that have been explicitly hidden, and also controls that are hidden because their parent is hidden.

      This bug applies to inbuilt controls also, those that I have spotted are:

      1. TabPane control has the close buttons on tabs listed, and the tabs can be closed, even if the TabPane has been configured not to allow tab closing.
      2. Scrollable panes have scroll bars listed even when they are not visible.
      3. The ListView of a ComboBox is read out even when the drop down of the ComboBox is not showing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jgiles Jonathan Giles
                Reporter:
                gnelson Greg Nelson
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: