RFR: 8273986: JEditorPane HTML Demo - Accessibility issues [v6]
Alexander Zuev
kizune at openjdk.org
Fri Mar 10 19:52:57 UTC 2023
On Thu, 9 Mar 2023 09:23:07 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> JAccessWalker was not able to show component tree correctly if we switch pages for HTML content.
>>
>> Observation:
>> The issue observed is that the children are not reported correct for root element when switching of pages happened. The reason behind it is that the `getAccessibleChildrenCount` API is called on the old `accessibleContext` object which return the children count as 0. Whenever we switch the page the children count is recalculated based on the root element but the `accessibleContext `object used to retrieve the child remains unchanged and due to that it return the children count 0.
>>
>> Solution:
>>
>> Added a condition check to create a new `accessibleContext `object to find out the children count correctly whenever we switch the pages in JEditorPane.
>>
>> Checked with the SwingSet2 JEditorPane demo and it reports well the component tree in JAccessWalker.
>>
>> Steps to verify:
>>
>> JBS contains the steps to reproduce the scenario.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Whitespace error fix and unused image file removed
My question would be - is it really necessary to bring the entire HTML set from the demo to test the accessibility? Can we just create a small and simple HTML document with some structure that should be interpreted as a document with nested children? Additionally - i do not understand why do we even need an interactive UI test with the robot and such. Why is it necessary? Why simple creation of JEditorPane and assigning url to it does not work?
-------------
PR: https://git.openjdk.org/jdk/pull/12707
More information about the client-libs-dev
mailing list