-
Notifications
You must be signed in to change notification settings - Fork 541
8298382: JavaFX ChartArea Accessibility Reader #1016
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
Conversation
Change the underlying class XYChart to take into account labels for axes. Make label patterns and default axes labels localized.
|
/reviewers 2 |
|
👋 Welcome back kizune! A progress list of the required criteria for merging this PR into |
|
@kevinrushforth |
Webrevs
|
|
Can you provide an evaluation of the bug and a description of the fix? |
Done. |
Thanks. Can you enable GitHub actions for your repo? If you click on the "Checks" tab you 'll see a message from Skara with a pointer as to how to do that (the short answer is you go to "Actions" for your personal fork and click the big green button to enable it). Then you can either manually trigger a test run or push a commit (e.g., an empty commit or a merge from master) to trigger a run. |
kevinrushforth
left a comment
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.
My initial testing (on Windows) looks good. I have a general question in addition to the one inline comment. Since you added new i18n resource strings have you verified that it works for other locales to ensure no regression? (it should just speak the English string, since there are no translated strings yet)
As for the implementation, I see you've added a (private) shadow property for the x and y axes and the series, as opposed to making them actual properties with only the getter being exposed publicly. As long as the fields are only ever set via the setter method, I think it should work fine the way you have it, but want to take a second look.
modules/javafx.controls/src/main/java/javafx/scene/chart/XYChart.java
Outdated
Show resolved
Hide resolved
| Dialog.confirm.header=Confirmation | ||
|
|
||
| ### Charts ### | ||
| XYChart.series.accessibleText={0} {1} is {2} {3} is {4} |
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 provide a hint to the translators on how these strings need to be translated, like giving an example of rendered text?
I am sure they will have fun translating "A B is C D is E"
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 provide a hint to the translators on how these strings need to be translated, like giving an example of rendered text?
And that is why i did not do any "Google translate" translation in this PR - i will raise a new bug to translate the new strings where i will describe their meaning and hints on how to translate. Because even if that will be me who is doing the translation i would like to give a reviewer more information on what and how i translate it.
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.
one way to do it is to describe the expected result in the comment immediately preceding the string. For example:
# "the current execution is complete"
Class.runText=The run is run.
Also, for testing purposes, we could consider pseudolocalization
https://en.wikipedia.org/wiki/Pseudolocalization
Better discuss this with Naoto Sato.
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.
Sorry for accidentally editing your comment. I think I restored it correctly.
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.
one way to do it is to describe the expected result in the comment immediately preceding the string.
...Also, for testing purposes, we could consider pseudolocalization
These are good suggestions that should be captured in the follow-up issue that Alex said he will file.
Localization and testing is out of scope for this PR. Alex did the minimum needed to correct the fact that the string wasn't internationalized at all, which makes sense only because he had to modify the string as part of this PR (even then, I would have been OK with no i18n changes in this PR, leaving them for a separate issue as well).
Better discuss this with Naoto Sato.
Good idea.
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.
Still, I would recommend adding a comment (since now is the time when we know all the context, and in the future we might forget or lose the context), may be something like
# {seriesName} {xAxisName} is {currentX} {yAxisName} is {currentY}
XYChart.series.accessibleText={0} {1} is {2} {3} is {4}
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.
Still, I would recommend adding a comment (since now is the time when we know all the context, and in the future we might forget or lose the context), may be something like
Good idea, let me do it for both strings with parameters
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.
sorry to hold up the review - I'll speak to Naoto Sato tomorrow (2/3/23 @ 11:00) regarding the requirements for translation hints, and either approve or let you know what they expect us to do.
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.
OK. Presuming that the comment Alex already left is fine, or just needs a slight format change, then that's good. If it's more than that, it would be better to do it in a follow-up issue.
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 comment is good.
The idea of giving translators hints in the form of comments like this was very warmly welcomed by our i18n lead Naoto Sato. So I think we should follow this approach for every new string we add in jfx (and jdk).
The goal is to give the translators more context, by either giving an example of resulting text or by describing the parameters like Alex did in this case (or both).
I did - tested with Japanese VoiceOver on Mac, it correctly constructs the string. |
Done and done, tests are passed. |
kevinrushforth
left a comment
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.
Looks good, apart from the recommendation to remove the one unused method you added.
modules/javafx.controls/src/main/java/javafx/scene/chart/XYChart.java
Outdated
Show resolved
Hide resolved
andy-goryachev-oracle
left a comment
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.
very good, thank you.
| Dialog.confirm.header=Confirmation | ||
|
|
||
| ### Charts ### | ||
| XYChart.series.accessibleText={0} {1} is {2} {3} is {4} |
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 comment is good.
The idea of giving translators hints in the form of comments like this was very warmly welcomed by our i18n lead Naoto Sato. So I think we should follow this approach for every new string we add in jfx (and jdk).
The goal is to give the translators more context, by either giving an example of resulting text or by describing the parameters like Alex did in this case (or both).
|
@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: 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
Please see this link for an up-to-date comparison between the source branch of this pull request and the 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 (@kevinrushforth, @andy-goryachev-oracle) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@azuev-java |
|
/sponsor |
|
Going to push as commit 33f1f62.
Your commit was automatically rebased without conflicts. |
|
@andy-goryachev-oracle @azuev-java Pushed as commit 33f1f62. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Change the underlying class XYChart to take into account labels for axes. Make label patterns and default axes labels localized.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/1016/head:pull/1016$ git checkout pull/1016Update a local copy of the PR:
$ git checkout pull/1016$ git pull https://git.openjdk.org/jfx pull/1016/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1016View PR using the GUI difftool:
$ git pr show -t 1016Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1016.diff