On Wed, 14 Jan 2026 20:18:08 GMT, Alexander Zuev <[email protected]> wrote:

> The issue with the announcement of the custom spin boxes is that the text 
> field inside when the value is being changed by the spinbox data model 
> generates some events that are being interpreted by the accessibility 
> subsystem as if text is being actively edited and the system tries to 
> announce it accordingly. In order to stop it from happening we are going to 
> generate correct events and temporarily suppress the text field's methods 
> that reporting the editing-related changes until the actual editing is 
> happened.
> 
> Make embedded text field not to generate random edit-related events;
> Add manual test case;

I also checked this patch in IntelliJ and it fixed this issue with our spinners 
as well.

src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m 
line 89:

> 87:         if ([child 
> conformsToProtocol:@protocol(NSAccessibilityNavigableStaticText)]) {
> 88:             NSAccessibilityPostNotification(child, 
> NSAccessibilityLayoutChangedNotification);
> 89:             NSAccessibilityPostNotification(child, 
> NSAccessibilityAnnouncementRequestedNotification);

I assume this line is not necessary, 
`NSAccessibilityAnnouncementRequestedNotification` is used to make VoiceOver 
announce an arbitrary string, which would be passed in `userInfo` argument for 
`NSAccessibilityPostNotificationWithUserInfo`.

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

PR Review: https://git.openjdk.org/jdk/pull/29235#pullrequestreview-3687337651
PR Review Comment: https://git.openjdk.org/jdk/pull/29235#discussion_r2712651332

Reply via email to