Skip to content

NVDA should report Java controls which are disabled as unavailable#13711

Merged
seanbudd merged 3 commits into
nvaccess:masterfrom
aphtech:jabUnavailableControls
May 20, 2022
Merged

NVDA should report Java controls which are disabled as unavailable#13711
seanbudd merged 3 commits into
nvaccess:masterfrom
aphtech:jabUnavailableControls

Conversation

@mwhapples

@mwhapples mwhapples commented May 19, 2022

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #10993

Summary of the issue:

Controls in Java applications which do not have the enabled state are not being spoken as unavailable by NVDA.

Description of how this pull request fixes the issue:

Java accessibility API states that controls lacking the enabled state cannot be manipulated and normally are shown as greyed out. I understand lacking the enabled state to map to unavailable in NVDA and so this pull request checks if enabled is not present and sets the unavailable state accordingly.
In the (java documentation at https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/accessibility/AccessibleState.html it says the following for the enabled state:
public static final AccessibleState ENABLED
Indicates this object is enabled. The absence of this state from an object's state set indicates this object is not enabled. An object that is not enabled cannot be manipulated by the user. In a graphical display, it is usually grayed out.

Testing strategy:

Manual testing.

Known issues with pull request:

The original issue referenced describes this for menus. It appears that (java Swing applications do not set focus to unavailable menu items and object review filters out unavailable menu items. So the example in the referenced issue cannot be used for testing, other examples may be needed.

Change log entries:

New features
Changes
Bug fixes
Fix NVDA not reporting disabled/enabled state correctly for controls exposed through (java Access Bridge.
For Developers

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests None added, no breakage.
    • System (end to end) tests None added.
    • Manual testing Done.
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation N/A
    • Developer / Technical Documentation N/A
    • Context sensitive help for GUI changes N/A
  • UX of all users considered:
    • Speech Yes
    • Braille Yes
    • Low Vision Yes
    • Different web browsers N/A
    • Localization in other languages / culture than English Yes

@mwhapples mwhapples requested a review from a team as a code owner May 19, 2022 14:09
@mwhapples mwhapples requested a review from seanbudd May 19, 2022 14:09
@seanbudd

Copy link
Copy Markdown
Member

Could you elaborate on manual testing? What are the steps to reproduce?

@seanbudd seanbudd merged commit 6cf16d1 into nvaccess:master May 20, 2022
@nvaccessAuto nvaccessAuto added this to the 2022.2 milestone May 20, 2022
@mwhapples

Copy link
Copy Markdown
Contributor Author

I created a Java test application to move focus to unavailable controls which I attach. Since doing that I remembered the "Simple review mode" setting in "Review cursor" settings in NVDA, turning that off meant I could test the original test app in the referenced issue by finding the menu item with object review.
Scratch2.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NVDA does not report disabled menu items as unavailable

3 participants