Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk21 Public archive

Commit

Permalink
8309733: [macOS, Accessibility] VoiceOver: Incorrect announcements of…
Browse files Browse the repository at this point in the history
… JRadioButton

Reviewed-by: prr
Backport-of: d1d2b55ce0b950e07f6e3761983f73fd58079627
  • Loading branch information
Alexander Zuev committed Jun 23, 2023
1 parent 8b12726 commit 1bcf001
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -182,17 +182,23 @@ public void propertyChange(PropertyChangeEvent e) {

// Do send check box state changes to native side
if (thisRole == AccessibleRole.CHECK_BOX) {
valueChanged(ptr);
if (newValue != null && !newValue.equals(oldValue)) {
valueChanged(ptr);
}
}

// Do send radio button state changes to native side
if (thisRole == AccessibleRole.RADIO_BUTTON) {
valueChanged(ptr);
if (newValue != null && !newValue.equals(oldValue)) {
valueChanged(ptr);
}
}

// Do send toggle button state changes to native side
if (thisRole == AccessibleRole.TOGGLE_BUTTON) {
valueChanged(ptr);
if (newValue != null && !newValue.equals(oldValue)) {
valueChanged(ptr);
}
}
} else if (name.equals(ACCESSIBLE_NAME_PROPERTY)) {
//for now trigger only for JTabbedPane.
Expand Down

1 comment on commit 1bcf001

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.