8377936: VoiceOver Reads Button Incorrectly#30641
Open
mickleness wants to merge 1 commit intoopenjdk:masterfrom
Open
8377936: VoiceOver Reads Button Incorrectly#30641mickleness wants to merge 1 commit intoopenjdk:masterfrom
mickleness wants to merge 1 commit intoopenjdk:masterfrom
Conversation
The crux of 8377936 was: VoiceOver would request to transfer the keyboard focus from X to Y. This caused X to lose keyboard focus. VoiceOver would (imperceptibly briefly) start to announce Y, and then Swing would fire an AccessibleStateSet change because X lost its FOCUSABLE state. This notified CAccessible's AXChangeNotifier because the AccessibleStateSet changed, and it would call `valueChanged`. So VoiceOver immediately re-announced X (instead of its expected behavior: it should finish announcing Y and ignore X.)
|
👋 Welcome back jwood! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@mickleness The following label will be automatically applied to this pull request:
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this PR:
We call
CAccessible.valueChangedwhen we believe the value changed, not when the AccessibleStateSet changed.Although this is a small refactor: it touches parts of code that span approximately a decade of different bug fixes. At least one of these older bugs was a P2. I tried to note the related issues in the test for reference. (Also in my testing I confirmed JRadioButtons and JToggleButtons work as expected, but I kept the final test simple for the convenience of human testers.)
In 8377936 the problem was:
We had two components, X and Y. When VO transferred the focus from X to Y, it would (ever so briefly) start to announce Y.** Then Swing would update X's AccessibleContext to inform it that X was no longer focused, therefore X's AccessibleStateSet changed. This triggered CAccessible's AXChangeNotifier, which called
CAccessible.valueChanged. This resulted in VoiceOver announcing X's state (as if it thought the selected state changed), even though the keyboard focus was now on Y.The AXChangeNotifier was probably intending to call
valueChangedonly when AccessibleState.SELECTED or CHECKED or something important was updated. The fact that it calledvalueChangedfor AccessibleState.FOCUSED is probably an oversight***.** If you comment out the line in CAccessibility.requestFocus that actually requests the focus: then VoiceOver announced Y correctly. But this left the keyboard focus on the wrong component.
*** I also tested triggering AccessibleState.FOCUSABLE, AccessibleState.VISIBLE, and a few other states; none of them resulted in a comparable bug, though.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30641/head:pull/30641$ git checkout pull/30641Update a local copy of the PR:
$ git checkout pull/30641$ git pull https://git.openjdk.org/jdk.git pull/30641/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30641View PR using the GUI difftool:
$ git pr show -t 30641Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30641.diff
Using Webrev
Link to Webrev Comment