-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8267385: Create NSAccessibilityElement implementation for JavaComponentAccessibility #4412
Conversation
👋 Welcome back savoptik! A progress list of the required criteria for merging this PR into |
@savoptik this pull request can not be integrated into git checkout JDK-8152350-6
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
@@ -719,6 +722,32 @@ public Accessible call() throws Exception { | |||
}, c); | |||
} | |||
|
|||
// This method is called from the native | |||
// Each child takes up three entries in the array: one for itself, one for its role, and one for the recursion level | |||
public static Object[] getChildrenAndRolesRecursive(final Accessible a, final Component c, final int whichChildren, final boolean allowIgnored, final int level) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure but i think CAccessible is considered a public API so adding public methods to it might require a CSR filling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Webrevs
|
/issue add JDK-8262031 |
@azuev-java Only the author (@savoptik) is allowed to issue the |
/issue add JDK-8262031, JDK-8264287, JDK-8264303, JDK-8264292, JDK-8267387, JDK-8267388 |
@savoptik Adding additional issue to issue list: Adding additional issue to issue list: Adding additional issue to issue list: Adding additional issue to issue list: Adding additional issue to issue list: |
@pbansal please review |
/issue add JDK-8264286, JDK-8264298 |
@savoptik Adding additional issue to issue list: |
newChild = [TableAccessibility alloc]; | ||
if ([javaRole isEqualToString:@"pagetablist"]) { | ||
newChild = [TabGroupLegacyAccessibility alloc]; | ||
} else if ([javaRole isEqualToString:@"table"]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we even need legacy peer implementation in the new classes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new TabGroup is also named TabGroupAccessibility, so as not to get out of the naming, the old class is renamed for this, otherwise the building will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But when are these Legacy classes used? The "pagetablist" and "table" roles are being handled in commonComponentAccessibility and new implementation classes will be used there. Why can't we just remove these legacy classes and any references to them, instead of renaming them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By agreement, it was decided that we do not remove the legacy code yet until at least one release has passed to make sure there are no regressions.
The legacy code can then be removed with a separate commit without any difficulty.
/issue add JDK-8264291 |
@savoptik |
@pbansal The initial change - to move functionality from JavaComponentAccessibility to CommonComponentAccessibility requires touching up of almost all (if not all) of the new files in this project - this is why too much change being done in one PR as a reason why has been decided to push all the components in one PR go instead of doing things component by component like we did in the past. We just need to spend much more time on this review and the good thing is that this Change will be baked in 18 EA enough time versus 17 which is already on stabilization phase. |
BOOL value = (*env)->CallStaticBooleanMethod(env, sjc_CAccessibility, jm_isEnabled, fAccessible, fComponent); | ||
CHECK_EXCEPTION(); | ||
if (!value) { | ||
NSLog(@"WARNING: %s called on component that has no accessible component: %@", __FUNCTION__, self); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this warning being thrown when trying to use the disabled slider. If we run SwingSet2 and go to Slider demo. Try to navigate to disabled sliders using the VO keys. This warning is thrown when the VO focus is shifted to disabled sliders. I don't see similar warning before this change. This is the warning I see
" WARNING: -[CommonComponentAccessibility isAccessibilityEnabled] called on component that has no accessible component: <SliderAccessibility: 0x7fc938147c00>"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
During testing of text input i have found that the previous implementation with voiceover active pronounced every entered character and then, whet typing pauses, it pronounced the last entered word. With new implementation i only hear the first typed character in the text field and then nothing - no other characters and no last entered word. Looks like we are not sending some notification to the system when text is updated. Needs further investigation. |
…s, as well as a11y components nested in list rows, disappeared; 2. Added checks for exceptions; 3. corrected descriptions of tests; 4. Fixed a problem with the pronunciation of the edited text. 5. Fixed a problem due to which the line number in the table was not pronounced correctly.
…generated by the javac?
…ese methods to call invokeAndWait only once per callback from the native, as it usually was done before?
2. Fixed a potential problem with memory in table cells; 3. Fixed a problem with the sounding of cell coordinates.
…, but it will be done before by the CHECK_EXCEPTION. The macro also will log it when necessary. 2. What happens if "fAccessible" and "fComponent" will be null due to OOM, should we rethrow this exception, or ignoring it is fine?
2. I suggest doing the opposite, leave the CHECK_EXCEPTION and remove the chech and the logging. The CHECK_EXCEPTION is better since it can be configured via properties, and it will chech itself on what thread the current code is executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some issues - namely, accessibility cursor got stuck inside combobox popup after popup is closed and voiceover shortcuts such as control option space announced in combobox but do nothing - but they can be fixed in separate bugs. Overall the new API is working and the functional difference can be overcome later in separate changes.
@savoptik 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:
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 825 new commits pushed to the
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 (@azuev-java, @pankaj-bansal, @mrserb) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@pankaj-bansal please review the latest revision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the latest version and all the problems I had mentioned earlier are no longer present. I also used few components like Combobox, Sliders, Buttons etc and things look good. As Alex mentioned, if there are small issues present, they can be fixed later in follow up bugs.
/integrate |
/sponsor |
/sponsor |
Going to push as commit 9c6457f.
Your commit was automatically rebased without conflicts. |
@forantar The command |
Thanks all for the thorough review and deep testing! |
8267385: Create NSAccessibilityElement implementation for JavaComponentAccessibility
This pull request contains solutions for the following tickets:
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4412/head:pull/4412
$ git checkout pull/4412
Update a local copy of the PR:
$ git checkout pull/4412
$ git pull https://git.openjdk.java.net/jdk pull/4412/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4412
View PR using the GUI difftool:
$ git pr show -t 4412
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4412.diff