<AWT Dev> [14] RFR : 8226253 : JAWS reports wrong number of radio buttons when buttons are hidden.

Alexander Zuev alexander.zuev at oracle.com
Mon Mar 2 16:44:40 UTC 2020


Hi Ambarish,

   new fix looks better. Quick question - is there any testcase (even 
manual one) that i can use to play a bit with the fix?
I would love to test the corner cases such as keyboard navigation within 
the JCobmoBox popup.

/Alex

On 3/2/20 07:13, Ambarish Rapte wrote:
>
> Hi Pankaj,
>
> Please take a look at the updated fix: 
> http://cr.openjdk.java.net/~arapte/a11y/8226253/webrev.03
>
> Changes in the webrev.03:
>
>  1. Addressed review comments given by Pankaj.
>  2. The fix suggested in webrev.01 had below two issues, both are
>     fixed in webrev.03.
>      1. Correct information of a component was not passed to screen
>         reader
>         when there are multiple invisible components are added to a
>         ButtonGroup.
>      2. An item of JComboBox which is not currently showing on screen but
>         will be shown on next key press was not read by screen reader.
>
> Regards,
>
> Ambarish
>
> *From:* Pankaj Bansal
> *Sent:* Tuesday, October 1, 2019 9:55 PM
> *To:* Ambarish Rapte <ambarish.rapte at oracle.com>; awt-dev at openjdk.java.net
> *Subject:* RE: <AWT Dev> [14] RFR : 8226253 : JAWS reports wrong 
> number of radio buttons when buttons are hidden.
>
> Hi Ambarish,
>
> I have few observations
>
> I think underscore (_) should be removed from newly added function 
> names as it is not there in any other function.
>
> if (beforeIndex >= childrenCount) {
>
> this check is not required inside else condition in 
> get_nonVisibleChildrenCountBeforeIndex(AccessibleContext parentAC, int 
> beforeIndex  as this case is being handled by the if part of loop.
>
> You should be able to reuse 
> get_NonVisibleTargetCountBeforeIndex(Object[] targets, int 
> indexBefore) inside getAccessibleRelationTargetCount  instead of 
> writing separate loop there.
>
> || beforeIndex < 0
>
> is added in if loop in 
> get_nonVisibleChildrenCountBeforeIndex(AccessibleContext parentAC, int 
> beforeIndex), but not added in 
> get_NonVisibleTargetCountBeforeIndex(Object[] targets, int 
> indexBefore) {. Is this intentional?
>
> Regards,
>
> Pankaj
>
> *From:* Ambarish Rapte
> *Sent:* Tuesday, September 10, 2019 11:30 PM
> *To:* awt-dev at openjdk.java.net <mailto:awt-dev at openjdk.java.net>
> *Subject:* <AWT Dev> [14] RFR : 8226253 : JAWS reports wrong number of 
> radio buttons when buttons are hidden.
>
> Hi,
>
> Please review this fix,
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8226253
>
> Webrev: http://cr.openjdk.java.net/~arapte/a11y/8226253/webrev.01/
>
> Issue:
>
> AccessibleContext.getAccessibleChildrenCount() returns number of all 
> Accessible children, but does not take visibility of a child component 
> in consideration.
>
> Fix:
>
> 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.
>
> Verification:
>
> 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()
>
> Regards,
>
> Ambarish
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20200302/9cc8153c/attachment.htm>


More information about the awt-dev mailing list