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

8339728: [Accessibility,Windows,JAWS] Bug in the getKeyChar method of the AccessBridge class #3001

Closed
wants to merge 1 commit into from

Conversation

vieiro
Copy link
Contributor

@vieiro vieiro commented Feb 24, 2025

Backport of JDK-8339728 from 17u that solves some accessibility issues on Windows, for parity with 11.0.27/28-oracle (and because it's marked as CPU25-critical-SQE-OK too). Low risk.

The test does fail without this fix (when read-out, the short-cuts are truncated, so for instance the menu short-cut "Ctrl+Shift+Period" was read out as "Control plus Shift plus P", instead of "Control plus Shift plus Period".

The new accessibility test passes on Windows 10 (tested with JAWS v. 2025.2412.102 - February 2025 ).

Clean but for an update in copyright header and for a multi-line string (that has been replaced) in AccessBridge.java.


Progress

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

Issue

  • JDK-8339728: [Accessibility,Windows,JAWS] Bug in the getKeyChar method of the AccessBridge class (Bug - P3 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3001/head:pull/3001
$ git checkout pull/3001

Update a local copy of the PR:
$ git checkout pull/3001
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3001/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3001

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3001.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 24, 2025

👋 Welcome back vieiro! 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
Copy link

openjdk bot commented Feb 24, 2025

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

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

8339728: [Accessibility,Windows,JAWS] Bug in the getKeyChar method of the AccessBridge class

Reviewed-by: sgehwolf

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 5 new commits pushed to the master branch:

  • 624cef6: 8351099: Bump update version of OpenJDK: 11.0.28
  • 8785172: 8026976: ECParameters, Point does not match field size
  • 289644a: 8346887: DrawFocusRect() may cause an assertion failure
  • ea3a0e4: 8328957: Update PKCS11Test.java to not use hardcoded path
  • 659a466: 8306408: Fix the format of several tables in building.md

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@jerboaa) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title Backport 01d107aea8eca4f4d2863deb30ac60e802debe15 8339728: [Accessibility,Windows,JAWS] Bug in the getKeyChar method of the AccessBridge class Feb 24, 2025
@openjdk
Copy link

openjdk bot commented Feb 24, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Feb 24, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 24, 2025

Webrevs


public class TestJMenuItemShortcutAccessibility {
public static void main(String[] args) throws Exception {
String INSTRUCTIONS = ""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one was a multiline String constant in JDK17 and above.

@jerboaa
Copy link
Contributor

jerboaa commented Mar 11, 2025

@fthevenet Could you please help test/review this patch. Thank you!

@fthevenet
Copy link
Member

fthevenet commented Mar 14, 2025

@fthevenet Could you please help test/review this patch. Thank you!

Hmm... I can't seem to get JAWS to work with swing applications at all on my machine: it doesn't read anything from inside the JFrame (only the window title).
FWIW, it seems to work as expected with "native" applications or even javafx ones, but swing apps seems to be totally opaque to the screen reader software on my env.

This is I assume a configuration issue on my end, and has likely nothing to do with this change, as I've experienced the same with 11.0.26 and 23.0.2, but it means I unfortunately won't be able to test this until I get this working.

@jerboaa
Copy link
Contributor

jerboaa commented Mar 14, 2025

OK. Thanks!

@fthevenet
Copy link
Member

fthevenet commented Mar 14, 2025

Okay so today I learned that the accessibility bridge isn't enabled by default, and that you have to turn it on explicitly using jabswitch -enable[1]
With this turned on, I was finally able to test this change and I can confirm that the screen reader software would read out the shortcuts correctly with the change, while it would only reads the first letter of the last key when running it in 11.0.26.
As a side note, I ran this test with NVDA instead of JAWS, so it is good to see this works with a larger panel of accessibility solutions.

I'm tempted to say that adding a short mention to turning on the accessibility bridge in the comments that describe how to run the test would go a long way toward saving some time to people who, like me, aren't familiar with screen readers, but I'm not sure that this is something that belong into a backport. WDYT @jerboaa ?

[1] https://docs.oracle.com/en/java/javase/11/access/enabling-and-testing-java-access-bridge.html

@vieiro
Copy link
Contributor Author

vieiro commented Mar 14, 2025

I'm tempted to say that adding a short mention to turning on the accessibility bridge in the comments that describe how to run the test would go a long way to saving some time to people who, like me, aren't familiar with screen readers, but I'm not sure that this is something that belong into a backport. WDYT @jerboaa ?

Thanks for the review, @fthevenet ! Maybe updating the doc/testing.md is a good idea too?

@jerboaa
Copy link
Contributor

jerboaa commented Mar 14, 2025

WDYT @jerboaa ?

Yes, not something to introduce in this backport. Feel free to propose this simple change in https://github.com/openjdk/jdk, @fthevenet

@jerboaa
Copy link
Contributor

jerboaa commented Mar 14, 2025

Thanks for the review, @fthevenet ! Maybe updating the doc/testing.md is a good idea too?

It could be. Propose this for JDK head first, though. Thanks!

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

Clean but for an update in copyright header and for a multi-line string (that has been replaced) in AccessBridge.java.

Confirmed. Patch looks fine to me.

@openjdk
Copy link

openjdk bot commented Mar 14, 2025

⚠️ @vieiro This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@vieiro
Copy link
Contributor Author

vieiro commented Mar 18, 2025

/approval request Please approve this backport from JDK-17 that fixes an accessibility problem in Windows, where JMenuItem shortcuts were not properly read out. Low risk. Verified in Windows 10 with JAWS.

@openjdk
Copy link

openjdk bot commented Mar 18, 2025

@vieiro
8339728: The approval request has been created successfully.

@openjdk openjdk bot added approval ready Pull request is ready to be integrated and removed approval labels Mar 18, 2025
@vieiro
Copy link
Contributor Author

vieiro commented Mar 18, 2025

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 18, 2025
@openjdk
Copy link

openjdk bot commented Mar 18, 2025

@vieiro
Your change (at version ae1b64c) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Mar 18, 2025

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 18, 2025

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

  • 624cef6: 8351099: Bump update version of OpenJDK: 11.0.28
  • 8785172: 8026976: ECParameters, Point does not match field size
  • 289644a: 8346887: DrawFocusRect() may cause an assertion failure
  • ea3a0e4: 8328957: Update PKCS11Test.java to not use hardcoded path
  • 659a466: 8306408: Fix the format of several tables in building.md

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 18, 2025
@openjdk openjdk bot closed this Mar 18, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 18, 2025
@openjdk
Copy link

openjdk bot commented Mar 18, 2025

@jerboaa @vieiro Pushed as commit bf78d9b.

💡 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
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants