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 5 11:37:11 UTC 2025
On Tue, 4 Feb 2025 13:24:29 GMT, Artem Semenov <asemenov at openjdk.org> wrote:
>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Condition evaluation simplified
>
> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java line 186:
>
>> 184: if (thisRole == AccessibleRole.CHECK_BOX) {
>> 185: if ((newValue != null && !newValue.equals(oldValue)) ||
>> 186: oldValue != null && !oldValue.equals(newValue)) {
>
> At first glance, these conditions look like the same thing. equals() above will return false if oldValue is null. oldValue.equals(newValue) and newValue.equals(oldValue) are also the same thing. Try to rewrite this condition more clearly.
I think @savoptik meant that `!oldValue.equals(newValue)` was redundant.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23436#discussion_r1942708541
More information about the client-libs-dev
mailing list