RFR: 8377428: VoiceOver Cursor Navigates Invisible Components

Sergey Bylokhov serb at openjdk.org
Mon Feb 9 23:08:47 UTC 2026


On Mon, 9 Feb 2026 08:35:13 GMT, Jeremy Wood <jwood at openjdk.org> wrote:

> This PR prevents VoiceOver from letting me navigate the VoiceOver cursor to hidden components.
> 
> ### Technical Details
> 
> VoiceOver is responsible for a call to `CAccessibility.getChildrenAndRoles(JFrame, JFrame, JAVA_AX_ALL_CHILDREN, false)`.
> 
> That last boolean is `allowIgnored`.
> 
> When `allowedIgnored == false` we already omitted certain components based on their AccessibleRole. This PR expands our definition of "what should be ignored" to include invisible Components.
> 
> ### Other Considerations
> 
> 1. Originally I thought the resolution to this problem would be to change JAVA_AX_ALL_CHILDREN to JAVA_AX_VISIBLE_CHILDREN . And maybe that's still a viable option, but after some research I've come to believe it's simpler/appropriate to change our definition of "ignored".
> 2. NSViews have a separate property `isHidden`. Another approach to this ticket might be to try to assign `myNSView.isHidden = !myJavaComponent.isVisible()`. Some reading suggests that this might (?) automatically resolve this ticket.

src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line 1077:

> 1075:         }
> 1076: 
> 1077:         AccessibleStateSet ass = context.getAccessibleStateSet();

Could you please add a test to verify that these methods from AccessibleContext are actually working? I doubt we currently have any tests that cover this code path.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29630#discussion_r2784969123


More information about the client-libs-dev mailing list