Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8309733: [macOS, Accessibility] VoiceOver: Incorrect announcements of JRadioButton #14605

Closed
wants to merge 1 commit into from

Conversation

azuev-java
Copy link
Member

@azuev-java azuev-java commented Jun 21, 2023

Only pass value changed event to the native accessibility peer when the value is actually changed. While at fixing it for RadioButton also fixing it for checkbox and toggle button so there is no need to re-visit this file later.
Also updating the copyright year.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8309733: [macOS, Accessibility] VoiceOver: Incorrect announcements of JRadioButton (Bug - P2)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14605/head:pull/14605
$ git checkout pull/14605

Update a local copy of the PR:
$ git checkout pull/14605
$ git pull https://git.openjdk.org/jdk.git pull/14605/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14605

View PR using the GUI difftool:
$ git pr show -t 14605

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14605.diff

Webrev

Link to Webrev Comment

… JRadioButton

Only pass value changed event to the native accessibility peer when the value is actually changed.
While at fixing it for RadioButton also fixing it for checkbox and toggle button so there is
no need to re-visit this file later.
Also updating the copyright year.
@bridgekeeper
Copy link

bridgekeeper bot commented Jun 21, 2023

👋 Welcome back kizune! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 21, 2023
@openjdk
Copy link

openjdk bot commented Jun 21, 2023

@azuev-java The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Jun 21, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 21, 2023

Webrevs

@kumarabhi006
Copy link
Contributor

kumarabhi006 commented Jun 22, 2023

Verified the fix and it behaves as expected.

As mentioned in JBS, the expected announcement should be Expected announcement: "Radio Two, radio button, 2 of 3. ..."
Should VO announce radiobutton's position also?

There is an another bug JDK-8309732 for position issue.

@azuev-java
Copy link
Member Author

Should VO announce radiobutton's position also?

That is beyond the scope of this bug but overall i would look at the native applications with the same type of controls. If native controls do not demonstrate the same behavior then i would say that it is not a problem on our side.

@kumarabhi006
Copy link
Contributor

Should VO announce radiobutton's position also?

That is beyond the scope of this bug but overall i would look at the native applications with the same type of controls. If native controls do not demonstrate the same behavior then i would say that it is not a problem on our side.

I checked in native application (i.e. system settings -> appearance) where radio buttons are announced with it's position along with label.

@@ -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)) {
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to have "newValue == null" and the "oldValue != null"? Do we need to update the native in this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. Null value is not a correct value to be set for these types of control so if null is passed then it is not a real value update event.

Copy link
Member

Choose a reason for hiding this comment

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

Objects.equals can be used to avoid null-check, it handles null values gracefully.

Copy link
Contributor

@savoptik savoptik left a comment

Choose a reason for hiding this comment

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

Is it possible to add a regression test on these components?
to test/jdk/java/awt/a11y


@NikitkoCent please review

@openjdk
Copy link

openjdk bot commented Jun 22, 2023

@azuev-java This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8309733: [macOS, Accessibility] VoiceOver: Incorrect announcements of JRadioButton

Reviewed-by: abhiscxk, asemenov, prr, serb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 236 new commits pushed to the master branch:

  • 31dcda5: 8295210: IR framework should not whitelist -XX:-UseTLAB
  • 4772893: 8310581: retry_class_loading_during_parsing() is not used
  • 5a82fa3: 8310577: Fix -Wconversion warnings in interpreter and oops
  • 130a9f1: 8292704: sun/security/tools/jarsigner/compatibility/Compatibility.java use wrong key size for EC
  • 0e4fde3: 8310453: Update javadoc of java.lang.Object
  • 230bcb7: 8309685: Fix -Wconversion warnings in assembler and register code
  • 370b8b2: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr
  • 5a30fb6: 8310591: Missing @since tags in java.lang.foreign
  • 8976ebf: 8310561: JFR: Unify decodeDescriptors(String, String)
  • 7da3f19: 8310549: avoid potential leaks in KeystoreImpl.m related to JNU_CHECK_EXCEPTION early returns
  • ... and 226 more: https://git.openjdk.org/jdk/compare/4a75fd462c002a209201d8bfc8d6c9eb286a7444...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 22, 2023
@azuev-java
Copy link
Member Author

Is it possible to add a regression test on these components? to test/jdk/java/awt/a11y

Not within this regression type fix unless i find a way to write an automatic regression test which i don't see a way of. As of creating a comprehensive test or set of tests that covers all of these components - that might be a separate task. But again it is outside of this fix scope.

Copy link
Contributor

@savoptik savoptik left a comment

Choose a reason for hiding this comment

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

LGTM.

@azuev-java
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 23, 2023

Going to push as commit d1d2b55.
Since your change was applied there have been 237 commits pushed to the master branch:

  • d6685f0: 8310510: Remove WordsPerLong
  • 31dcda5: 8295210: IR framework should not whitelist -XX:-UseTLAB
  • 4772893: 8310581: retry_class_loading_during_parsing() is not used
  • 5a82fa3: 8310577: Fix -Wconversion warnings in interpreter and oops
  • 130a9f1: 8292704: sun/security/tools/jarsigner/compatibility/Compatibility.java use wrong key size for EC
  • 0e4fde3: 8310453: Update javadoc of java.lang.Object
  • 230bcb7: 8309685: Fix -Wconversion warnings in assembler and register code
  • 370b8b2: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr
  • 5a30fb6: 8310591: Missing @since tags in java.lang.foreign
  • 8976ebf: 8310561: JFR: Unify decodeDescriptors(String, String)
  • ... and 227 more: https://git.openjdk.org/jdk/compare/4a75fd462c002a209201d8bfc8d6c9eb286a7444...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 23, 2023
@openjdk openjdk bot closed this Jun 23, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 23, 2023
@openjdk
Copy link

openjdk bot commented Jun 23, 2023

@azuev-java Pushed as commit d1d2b55.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
6 participants