NVDA should report Java controls which are disabled as unavailable (#13711)
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.