RFR: 8273986: JEditorPane HTML Demo - Accessibility issues [v5]

Abhishek Kumar abhiscxk at openjdk.org
Thu Mar 9 05:06:52 UTC 2023


> 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:

  Test case and supporting file added

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/12707/files
  - new: https://git.openjdk.org/jdk/pull/12707/files/0701ee48..bd4d65c4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12707&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12707&range=03-04

  Stats: 143 lines in 16 files changed: 142 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/12707.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12707/head:pull/12707

PR: https://git.openjdk.org/jdk/pull/12707



More information about the client-libs-dev mailing list