<AWT Dev>  RFR : 8226253 : JAWS reports wrong number of radio buttons when buttons are hidden.
ambarish.rapte at oracle.com
Tue Sep 10 18:00:11 UTC 2019
Please review this fix,
AccessibleContext.getAccessibleChildrenCount() returns number of all Accessible children, but does not take visibility of a child component in consideration.
Do not consider children that are not showing when providing accessible children count and when providing an accessible child of the component to screen reader.
This change is needed for both AccessibleContext and AccessibleRelationSet.
The newly added methods do not result in creating the AccessibleContext of children components earlier than before the fix.
The AccessibleContext gets created in AccessibilityEventMonitor.AccessibilityEventListener.installListeners(AccessibleContext) method, which occurs before the newly added methods get executed.
Tested the fix with JList with a custom AccessibleContext(custom ListModel) to hide non visible components, JRadioButton, JCheckBox, JToggleButton, JRadioButtonMenuItem, JCheckBoxMenuItem, JComboBox and SwingSet2.
Did not find any misbehavior with the fix.
Some pointers provided by Sergey in offline discussion:
1. Fix the issue on Java Access Bridge side. => http://cr.openjdk.java.net/~arapte/a11y/8226253/webrev.01/
2. Confirm that the fix does not create the AccessibleContext of children earlier than before the fix. => Does not happen
3. Test JList with a custom AccessibleContext. => Tested by adding a custom ListModel to JList. JList.AccessibleJList uses the ListModel for getAccessibleChildrenCount() and getAccessibleChild()
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev