Fix group box role in Java Access Bridge #13962
Merged
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:
#13836 partial fix.
Summary of the issue:
The group box containing radio buttons is not correctly identified in applications using the (java Access Bridge. This is due to a bug in the Java runtime. Most roles have their identifier string converted to something more readable through a resource bundle, however "groupbox" is not in the accessibility resource bundle, so the key "groupbox" is used. NVDA was previously expecting the groupbox role to be presented as "group box", which would be expected if it had been included in the accessibility resource bundle.
AccessibleRole source code: https://github.com/openjdk/jdk17u/blob/master/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java
Accessibility resource bundle: https://github.com/openjdk/jdk17u/blob/master/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility.properties
Description of user facing changes
NVDA previously was not identifying the group box for radio buttons in an application using Java Access Bridge. This change correctly maps the role exposed by Java Access Bridge to the grouping state.
Description of development approach
Comparing roles expected in NVDAobjects/JAB/init.py and those included in the accessibility resource bundle file and then the key used in the AccessibleRole class.
Testing strategy:
Manual testing with the application provided in the referenced issue.
Known issues with pull request:
As this seems to be a bug with the (java runtime, it may be fixed in the future, so I have kept both the work around and the original "expected" role name for mapping in NVDA. This does mean NVDA has more definitions than it really needs, but this is needed if we are to correctly support existing and future versions of the Java runtime correctly.
Change log entries:
New features
Changes
Bug fixes
For Developers
Code Review Checklist: