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

8087557: [Win] [Accessibility, Dialogs] Alert Dialog content is not fully read by Screen Reader #873

Closed
wants to merge 4 commits into from

Conversation

arapte
Copy link
Member

@arapte arapte commented Aug 17, 2022

Accessibility is not implemented for JavaFX dialogs. This change is to implement the accessibility on windows platform.
Without this fix : On Windows platform, content of Dialog are not read by Windows Narrator or JAWS.
With this fix:

  1. Windows narrator reads the dialog correctly
  2. JAWS fails to read the header text. : This will be handled separately
  3. Behavior of VoiceOver on MacOS remains unchanged : This will be handled separately.

Verification:

  1. Run HelloAlert toy app, with fix.
  2. Start Windows Narrator
  3. Click on the different buttons to show different Dialogs
    => Observe that Narrator reads all the content correctly.

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires a CSR request to be approved
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issues

  • JDK-8087557: [Win] [Accessibility, Dialogs] Alert Dialog content is not fully read by Screen Reader
  • JDK-8292658: [Win] [Accessibility, Dialogs] Alert Dialog content is not fully read by Screen Reader (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 873

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/873.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 17, 2022

👋 Welcome back arapte! 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 Ready for review label Aug 17, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 17, 2022

Webrevs

@kevinrushforth
Copy link
Member

This will need a CSR since you are adding a new enum value to AccessibleRole.

/csr
/reviewers 2

@openjdk openjdk bot added the csr Need approved CSR to integrate pull request label Aug 17, 2022
@openjdk
Copy link

openjdk bot commented Aug 17, 2022

@kevinrushforth has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@arapte please create a CSR request for issue JDK-8087557 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@openjdk
Copy link

openjdk bot commented Aug 17, 2022

@kevinrushforth
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

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

I left some comments on the AccessibleRole.DIALOG docs. Also, I get the following exception on macOS with VoiceOver when opening any dialog:

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot read field "ptr" because "macRole" is null
	at javafx.graphics@20-internal/com.sun.glass.ui.mac.MacAccessible.accessibilityAttributeValue(MacAccessible.java:1305)
	at javafx.graphics@20-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoopImpl(Native Method)
	at javafx.graphics@20-internal/com.sun.glass.ui.mac.MacApplication._enterNestedEventLoop(MacApplication.java:168)
	at javafx.graphics@20-internal/com.sun.glass.ui.Application.enterNestedEventLoop(Application.java:515)
	at javafx.graphics@20-internal/com.sun.glass.ui.EventLoop.enter(EventLoop.java:107)
	at javafx.graphics@20-internal/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(QuantumToolkit.java:631)
	at javafx.graphics@20-internal/javafx.stage.Stage.showAndWait(Stage.java:469)
	at javafx.controls@20-internal/javafx.scene.control.HeavyweightDialog.showAndWait(HeavyweightDialog.java:162)
	at javafx.controls@20-internal/javafx.scene.control.Dialog.showAndWait(Dialog.java:345)
	at hello.HelloAlert.lambda$start$0(HelloAlert.java:79)
...

You will need to at least implement a stub on macOS.

@arapte
Copy link
Member Author

arapte commented Aug 17, 2022

I get the following exception on macOS with VoiceOver when opening any dialog:

It is fixed in next commit

It was caused when VoiceOver requested role description for DIALOG role.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

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

Looks good now.

Copy link
Collaborator

@aghaisas aghaisas left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@openjdk openjdk bot removed the csr Need approved CSR to integrate pull request label Aug 22, 2022
@openjdk
Copy link

openjdk bot commented Aug 22, 2022

@arapte 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:

8087557: [Win] [Accessibility, Dialogs] Alert Dialog content is not fully read by Screen Reader

Reviewed-by: kcr, aghaisas

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

  • bee2dfb: 8291625: DialogPane without header nor headerText nor graphic node adds padding to the left of the content pane
  • d4ff45a: 8089009: TableView with CONSTRAINED_RESIZE_POLICY incorrectly displays a horizontal scroll bar.
  • 8815981: 8271395: Crash during printing when disposing textures
  • cedc17c: 8292549: GitHub actions: intermittent build failure on macOS while downloading ant
  • 5c47295: 8290473: update Eclipse .classpath in apps, buildSrc
  • 2618bf8: 8181084: JavaFX show big icons in system menu on macOS with Retina display
  • eaddb0f: 8291908: VirtualFlow creates unneeded empty cells

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.

➡️ 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 Ready to be integrated label Aug 22, 2022
@arapte
Copy link
Member Author

arapte commented Aug 22, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Aug 22, 2022

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

  • bee2dfb: 8291625: DialogPane without header nor headerText nor graphic node adds padding to the left of the content pane
  • d4ff45a: 8089009: TableView with CONSTRAINED_RESIZE_POLICY incorrectly displays a horizontal scroll bar.
  • 8815981: 8271395: Crash during printing when disposing textures
  • cedc17c: 8292549: GitHub actions: intermittent build failure on macOS while downloading ant
  • 5c47295: 8290473: update Eclipse .classpath in apps, buildSrc
  • 2618bf8: 8181084: JavaFX show big icons in system menu on macOS with Retina display
  • eaddb0f: 8291908: VirtualFlow creates unneeded empty cells

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 22, 2022
@openjdk openjdk bot closed this Aug 22, 2022
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review labels Aug 22, 2022
@openjdk
Copy link

openjdk bot commented Aug 22, 2022

@arapte Pushed as commit b951503.

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

@arapte arapte deleted the a11y-dialog branch September 1, 2022 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
3 participants