On Tue, 3 Nov 2026 21:34:51 GMT, Alexander Zuev <[email protected]> wrote:

> 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).

This pull request has now been integrated.

Changeset: 1b527a46
Author:    Alexander Zuev <[email protected]>
URL:       
https://git.openjdk.org/jfx/commit/1b527a46d9b635379e518332c4adc64111c4563a
Stats:     94 lines in 4 files changed: 63 ins; 23 del; 8 mod

8393476: [a11y] AssertionFailed in a double popup in macOS in debugger

Reviewed-by: angorya, arapte

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

PR: https://git.openjdk.org/jfx/pull/2360

Reply via email to