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

Reviewed-by: asemenov, kizune
  • Loading branch information
Abhishek Kumar committed Aug 7, 2023
1 parent 90d795a commit c1f4595
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

3 comments on commit c1f4595

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on c1f4595 Dec 18, 2023

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on c1f4595 Dec 18, 2023

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch backport-GoeLin-c1f4595e in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit c1f4595e from the openjdk/jdk repository.

The commit being backported was authored by Abhishek Kumar on 7 Aug 2023 and was reviewed by Artem Semenov and Alexander Zuev.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev.git backport-GoeLin-c1f4595e:backport-GoeLin-c1f4595e
$ git checkout backport-GoeLin-c1f4595e
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git backport-GoeLin-c1f4595e

Please sign in to comment.