Skip to content

Commit

Permalink
8311160: [macOS, Accessibility] VoiceOver: No announcements on JRadio…
Browse files Browse the repository at this point in the history
…ButtonMenuItem and JCheckBoxMenuItem

Backport-of: c1f4595e64b0ea0439c6e7f61a6a92b56b526d97
  • Loading branch information
GoeLin committed Dec 21, 2023
1 parent 7e086a2 commit d82430b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,25 @@ public void propertyChange(PropertyChangeEvent e) {
if (newValue != null && !newValue.equals(oldValue)) {
valueChanged(ptr);
}

// Notify native side to handle check box style menuitem
if (parentRole == AccessibleRole.POPUP_MENU && newValue != null
&& ((AccessibleState)newValue) == AccessibleState.FOCUSED) {
menuItemSelected(ptr);
}
}

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

// Notify native side to handle radio button style menuitem
if (parentRole == AccessibleRole.POPUP_MENU && newValue != null
&& ((AccessibleState)newValue) == AccessibleState.FOCUSED) {
menuItemSelected(ptr);
}
}

// Do send toggle button state changes to native side
Expand Down

1 comment on commit d82430b

@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.