Fix announcing of multi-line state in Java Access Bridge apps#15557
Merged
seanbudd merged 1 commit intoOct 3, 2023
Merged
Conversation
"multiple line" is the string that JAB returns for AccessibleState.MULTI_LINE. "multi_line" is still kept in the mapping to ensure backwards compatibility.
Collaborator
|
Please do not touch the changes file. This file will be changed by NV Access. |
Contributor
Author
I believe the current practice is to modify the change log file directly in PR: #15475. It's also stated in the contributing guide which I was following. |
Collaborator
|
No. Do not revert. I misled you because I was not aware of the final decision. I am sorry. |
Member
|
Given that multi line content is expected to require multi-line navigation to read the full text, I am going to say this closes #14609 |
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.
Link to issue number:
Fixes #14609
Summary of the issue:
NVDA doesn't report multi-line state for Java Access Bridge components that expose it.
Description of user facing changes
NVDA will correctly report multi-line state in applications using Java Access Bridge.
Description of development approach
Added mapping from "multiple line" JAB state to NVDA multiline state. There is already a mapping from "multi_line" JAB state to NVDA state, but the string was incorrect, so NVDA didn't announce it. JAB uses the string from the following resource file: https://github.com/openjdk/jdk/blob/516cfb135f7e5fefaf6e6f2928f6ecb88806f1ef/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_en.properties#L114. Existing "multi_line" value probably comes from the name of Java's AccessibleState.MULTI_LINE const, but it doesn't seem to have ever been used as a resource value after looking at the git history. I still kept it in the mapping to ensure backwards compatibility: while unlikely, it's possible that in older Java versions the value was "multi_line".
Testing strategy:
Manual testing with the sample app from #14609. NVDA output before and after the changes:
Before
After
Multi-line text is now correctly reported as "multi line". NVDA still reads only the first line, but this seems to be the same as with other read only multiline edits (e.g. NVDA Speech Viewer). Up/down arrows can still navigate the text, and the NVDA+down shortcut will read the whole text.
Known issues with pull request:
None.
Code Review Checklist: