> Querying native accessibility children from accessibilityIsIgnored can cause > AppKit to walk up the ancestor hierarchy and query the same window’s ignored > status again, resulting in infinite recursion that causes a > StackOverflowError. The error may go unnoticed during normal execution > because the native code clears pending Java exceptions, while an exception > breakpoint in a debug session exposes the StackOverflowError before it is > cleared. > > The fix introduces a Java method that traverses the JavaFX accessibility > children directly and reports whether the hierarchy contains context-menu or > tooltip content. The native peer uses this result to determine whether the > window should be ignored, without requesting native unignored children. > > The original child query also initialized descendant accessibility peers so > that VoiceOver could discover the menu content. The replacement preserves > this behavior by initializing every peer encountered during traversal and > continuing through all descendants even after finding a matching role. > > > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Add children visibility check. ------------- Changes: - all: https://git.openjdk.org/jfx/pull/2360/files - new: https://git.openjdk.org/jfx/pull/2360/files/cae6c67b..9749347e Webrevs: - full: https://webrevs.openjdk.org/?repo=jfx&pr=2360&range=01 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=2360&range=00-01 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jfx/pull/2360.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2360/head:pull/2360 PR: https://git.openjdk.org/jfx/pull/2360
