RFR: 8273986: JEditorPane HTML Demo - Accessibility issues [v9]
Abhishek Kumar
abhiscxk at openjdk.org
Wed Mar 22 18:45:22 UTC 2023
On Wed, 22 Mar 2023 18:35:09 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Access Ui field on EDT
>
> test/jdk/javax/accessibility/JEditorPane/TestEditorPaneAccessibleChildCount.java line 117:
>
>> 115: });
>> 116:
>> 117: if ((childCount1 != childCount2) &&
>
> This version will update the childCount1/2 on EDT but then will use it in the main thread w/o synchronization.
So, the if block should also be inside EDT as mentioned below. Right?
SwingUtilities.invokeAndWait(() -> {
childCount2 = ac.getAccessibleChildrenCount();
if ((childCount1 != childCount2) &&
(childCount1 != 0 && childCount2 != 0)) {
System.out.println("passed");
} else {
System.out.println("Test1 html page accessible children" +
" count is: "+ childCount1);
System.out.println("Test2 html page accessible children" +
" count is: "+ childCount2);
throw new RuntimeException("getAccessibleChildrenCount" +
" returned wrong child count");
}
});
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12707#discussion_r1145260219
More information about the client-libs-dev
mailing list