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

8256111: Create implementation for NSAccessibilityStaticText protocol #2147

wants to merge 2 commits into from


Copy link

@pankaj-bansal pankaj-bansal commented Jan 19, 2021

Create implementation for NSAccessibilityStaticText protocol

For testing that Label accessibility works fine, I have used something like I also tried few other labels with html text. I have verified that the Voice Over output for JLables is same before and after this change.

The class CommonTextAccessibility has most of the code taken from JavaTextAccessibility. Only the functions needed for StaticTextAccessibility have been taken as of now. Few more (not all) functions will be added to this class from JavaTextAccessiblity when work is done for NavigableStaticText or TextField, TextArea, Text, Password etc accessibility roles.

I could not see AccessibleRole.HYPERLINK or "hyperlink" role being used anywhere. As we are reworking the implementation, I have included both roles "label" and "hyperlink" as of now.


  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed


  • JDK-8256111: Create implementation for NSAccessibilityStaticText protocol



$ git fetch pull/2147/head:pull/2147
$ git checkout pull/2147

Copy link

@bridgekeeper bridgekeeper bot commented Jan 19, 2021

👋 Welcome back pbansal! 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.

Copy link

@openjdk openjdk bot commented Jan 19, 2021

@pankaj-bansal The following label will be automatically applied to this pull request:

  • awt

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.

@openjdk openjdk bot added the awt label Jan 19, 2021
@pankaj-bansal pankaj-bansal marked this pull request as ready for review Jan 19, 2021
@openjdk openjdk bot added the rfr label Jan 19, 2021
Copy link

@mlbridge mlbridge bot commented Jan 19, 2021


mrserb approved these changes Jan 20, 2021
Copy link

@openjdk openjdk bot commented Jan 20, 2021

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

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

8256111: Create implementation for NSAccessibilityStaticText protocol

Reviewed-by: serb, kizune

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 65 new commits pushed to 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 label Jan 20, 2021
- (NSString *)accessibilityValueAttribute;
- (NSRange)accessibilityVisibleCharacterRangeAttribute;
- (NSString *)accessibilityStringForRangeAttribute:(NSRange)parameter;
Copy link

@azuev-java azuev-java Jan 21, 2021

Just wondering: here you don't include nullability flags, but in StaticTextAccessibility you do. Any reason why such inconsistency?

Copy link

@pankaj-bansal pankaj-bansal Jan 21, 2021

There is no specific reason as such. I just thought of CommonTextAccessibility class as more of a helper class, so did not added these things here. But yes, it makes sense to be consistent. I will add the flag here as well and update the PR.

Copy link

@pankaj-bansal pankaj-bansal commented Jan 22, 2021


@openjdk openjdk bot closed this Jan 22, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jan 22, 2021
Copy link

@openjdk openjdk bot commented Jan 22, 2021

@pankaj-bansal Since your change was applied there have been 66 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit acbcde8.

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

@pankaj-bansal pankaj-bansal deleted the JDK-8256111 branch Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants