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

Abhishek Kumar abhiscxk at openjdk.org
Mon Feb 27 04:55:04 UTC 2023


On Fri, 24 Feb 2023 08:26:43 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Copyright year update
>
> src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java line 690:
> 
>> 688:         if (accessibleContext == null
>> 689:             || doc != theEditor.getDocument()) {
>> 690:             AccessibleHTML a = new AccessibleHTML(theEditor);
> 
> The "AccessibleHTML" internally registers the listener on the editor to update the state/doc. Why that notification does not work and it is necessary to recreate the "AccessibleHTML" here?

The "AccessibleHTML" does internally register the listener on the editor to update the state/doc.

But the `rootHTMLAccessibleContext` is not updated/created for the new root element on doc change and when  `getAccessibleChildrenCount` is called it returns the child count 0, because the API is get called on the old object.

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

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



More information about the client-libs-dev mailing list