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

Alexander Zuev kizune at openjdk.org
Tue Jan 20 01:25:00 UTC 2026


On Fri, 16 Jan 2026 10:16:43 GMT, Artem Semenov <asemenov 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 1:
> 
>> 1: /*
> 
> I'm a bit confused that you iterate through all the children in `accessibilityValue` and select the value of the last one.  
> And in `postValueChanged`, you post a whole stack of notifications for all the children.

I am only getting value from a child that conforms to the specific protocol - basically i get the last child that is a text editor and retrieve a value from it. If no text elements are in the child list then i am using the value from the spinner itself. Same with the sending extra notifications - i am only send them to the text elements and the notification is to assume that the entire internal structure of text element was updated - not just an incremental edit happened - and to ask VoiceOver to do announcement if it is not scheduled yet. There is a test attached - just try this test case with and without the changes and you will hear the difference.

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

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


More information about the client-libs-dev mailing list