JAW does not announce new value of Java ComboBox after selection with space key
Summary
Run Java application with any modern Oracle Java (i user JDK 18 and SwingSet2 from the built in demos) Go to any part that contains combo box With JAWS enabled navigate to combo box. JAWS announces the currently selected value. Press space to open the popup with choices With up/down keys select different item Press space to confirm selection
JAWS simply announces "Space, closed" indicating that combo box popup is closed. Newly selected value is not announced.
I tried on Java side to generate additional accessibility events like focus gain/value updated/content invalidated on the ComboBox but while events are generated JWS ignores these events and does not announce new value of the combo box.
Expected result
After popup window closed JAWS announces that focus is on combo box and its new value
Actual result
JAWS simply announces "Space, closed" indicating that combo box popup is closed. Newly selected value is not announced.
Example
Here is a simple Java application that can be used to test behavior:
import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.WindowConstants; import java.awt.BorderLayout; import java.lang.reflect.InvocationTargetException;
public class ComboBoxDemo { public static void main(String[] args) throws InterruptedException, InvocationTargetException { ComboBoxDemo demo = new ComboBoxDemo(); SwingUtilities.invokeAndWait(demo::setup); }
public void setup() {
JFrame frame = new JFrame("Test frame");
JComboBox combobox = new JComboBox();
combobox.setEditable(false);
combobox.addItem("One");
combobox.addItem("Two");
combobox.addItem("Three");
frame.setLayout(new BorderLayout());
frame.add(combobox, BorderLayout.CENTER);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
Additional Information
Oracle jdk 18 is available ay https://www.oracle.com/java/technologies/downloads/#jdk18-windows
JAWS version and build number
2022.2112.24 ILM
Operating System and version
Windows 11
Browser and version:
N/A