Skip to content

Commit

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

Reviewed-by: abhiscxk, asemenov, prr, serb
  • Loading branch information
Alexander Zuev committed Jun 23, 2023
1 parent d6685f0 commit d1d2b55
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

3 comments on commit d1d2b55

@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 d1d2b55 Dec 15, 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 d1d2b55 Dec 15, 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-d1d2b55c 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 d1d2b55c from the openjdk/jdk repository.

The commit being backported was authored by Alexander Zuev on 23 Jun 2023 and was reviewed by Abhishek Kumar, Artem Semenov, Phil Race and Sergey Bylokhov.

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-d1d2b55c:backport-GoeLin-d1d2b55c
$ git checkout backport-GoeLin-d1d2b55c
# 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-d1d2b55c

Please sign in to comment.