On Fri, 24 Feb 2023 08:26:43 GMT, Sergey Bylokhov <s...@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