8311160: [macOS, Accessibility] VoiceOver: No announcements on JRadioButtonMenuItem and JCheckBoxMenuItem

Reviewed-by: asemenov, kizune
This commit is contained in:
Abhishek Kumar 2023-08-07 05:02:16 +00:00
parent 90d795abf1
commit c1f4595e64

View File

@ -185,6 +185,12 @@ class CAccessible extends CFRetainedResource implements Accessible {
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
@ -192,6 +198,12 @@ class CAccessible extends CFRetainedResource implements Accessible {
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