RFR: 8348936: [Accessibility,macOS,VoiceOver] VoiceOver doesn't announce untick on toggling the checkbox with "space" key on macOS [v2]

Alexey Ivanov aivanov at openjdk.org
Wed Feb 12 16:35:16 UTC 2025


On Wed, 12 Feb 2025 15:49:37 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> @aivanov-jdk I think we should not change RadioButton's implementation as the announcement is not consistent. 
>> Do you have any other suggestion ?
>
> @kumarabhi006 Sorry the long delay.
> 
> I tested the behaviour of radio buttons and I can't see or hear any difference in announcements when the same condition, namely `!Objects.equals(newValue, oldValue)`, is used before calling `valueChanged(ptr)`.
> 
> I added a panel with three radio buttons to your test case. Initially all the buttons aren't selected. VoiceOver announces when I move to the first radio button. It also announces when I move between radio buttons with left and right arrows. Then when I press the <kbd>Space</kbd> key, the current radio button gets selected and this is announced by VoiceOver: selected, <the caption of the button>. When I move to another button with arrow keys, it doesn't get selected right away when VoiceOver is active, and VoiceOver announces that I moved to another button and that it's not selected. Pressing the <kbd>Space</kbd> key selects the currently active button.
> 
> What do you hear when testing such a scenario?

Tested with SwingSet2, and I can hear the difference in announcements.

It looks the difference comes from the focus events: when the old button loses focus, `valueChanged` isn't called currently, but if `Objects.equals` is used, `valueChanged` gets called twice.

Let's keep the current behaviour, it's more reliable even though it looks inconsistent.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23436#discussion_r1953019780


More information about the client-libs-dev mailing list