RFR: 8286258: [Accessibility, macOS, VoiceOver] VoiceOver reads the spinner value wrong and sometime partially

Alexander Zuev kizune at openjdk.org
Wed Jan 21 20:03:21 UTC 2026


On Wed, 21 Jan 2026 13:46:46 GMT, Dmitry Drobotov <duke at openjdk.org> 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;
>
> 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`.

I added it just to ping the a11y subsystem in non-disruptive manner, if i remember correctly without this notification rapid change back and forth resulted in not announcing the last selected value. Let me try to remove it and re-test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29235#discussion_r2714130874


More information about the client-libs-dev mailing list