You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When moving the keyboard focus to a non-editable JTextField, NVDA does not announce that this JTextField is not editable, although this information is transmitted via the Java Access Bridge. For a non-editable text field, the state "editable" is removed from the AccessibleStateSet.
Non-editable text fields can be used on Graphical User Interfaces to display read-only information which can be changed under certain conditions. The user need to get the state information of a non-editable text field to avoid typing and confusion.
I wrote a simple application Test_JTextField_NotEditable.jar with a frame containing two JTextField objects, an editable one and a non-editable one (including labels), and attached it to this bug report: Test_JTextField_NotEditable.zip
If you prefer a .java file, you can find it within the .jar file.
Steps to reproduce:
Extract the Test_JTextField_NotEditable.jar file from the linked .zip file.
Execute the attached .jar file with an up-to-date Java Runtime Environment, e.g. JDK/JRE version 17 or 18.
-> A Java window with title "Frame with two text fields" opens.
-> The text field with the label "Editable text field" has the keyboard focus.
-> NVDA announces: "Frame with two text fields, filler, filler, Editable text field, edit, blank"
("filler" is the AccessibleRole of the Box. In my opinion, the "filler" announcement is not useful, but this is not the topic of this bug report.)
Press Tab key.
-> The text field with the label "Read-only text field" has the keyboard focus.
-> NVDA announces: "Filler, Read-only text field, edit, This text can not be changed".
-> NVDA does not announce that this text field is not editable.
Actual behavior:
On non-editable text fields, NVDA announces the role "edit" without the non-editable state.
Expected behavior:
On non-editable text fields, NVDA should additionally announce the non-editable state, e.g.: "edit, not editable".
System configuration
NVDA installed/portable/running from source:
installed
NVDA version:
Version: 2021.3.5
Windows version:
Version: 10.0.19042 Build 19042
Name and version of other software in use when reproducing the issue:
java version "18.0.1" 2022-04-19
Java(TM) SE Runtime Environment (build 18.0.1+10-24)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.1+10-24, mixed mode, sharing)
Other information about your system:
Java Access Bridge is enabled.
Other questions
Does the issue still occur after restarting your computer?
Yes.
Have you tried any other versions of NVDA? If so, please report their behaviors.
Yes. Same behavior.
If NVDA add-ons are disabled, is your problem still occurring?
Not applicable.
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Not applicable.
The text was updated successfully, but these errors were encountered:
Closes#13692
Summary of the issue:
In a Java swing application NVDA does not announce a read only text control as being read only.
Description of how this pull request fixes the issue:
Java Access Bridge does not apply the editable state to read only controls. So when mapping JAB states to NVDA states check whether the control is a text control and whether it lacks the editable state, applying the read only state accordingly.
Retested with version 2022.2rc1 by running nvda_2022.2rc1.exe:
Missing state "editable" in AccessibleStateSet is announced as "read only", which means that issue is fixed. Thanks!
When moving the keyboard focus to a non-editable JTextField, NVDA does not announce that this JTextField is not editable, although this information is transmitted via the Java Access Bridge. For a non-editable text field, the state "editable" is removed from the AccessibleStateSet.
Non-editable text fields can be used on Graphical User Interfaces to display read-only information which can be changed under certain conditions. The user need to get the state information of a non-editable text field to avoid typing and confusion.
I wrote a simple application Test_JTextField_NotEditable.jar with a frame containing two JTextField objects, an editable one and a non-editable one (including labels), and attached it to this bug report:
Test_JTextField_NotEditable.zip
If you prefer a .java file, you can find it within the .jar file.
Steps to reproduce:
-> A Java window with title "Frame with two text fields" opens.
-> The text field with the label "Editable text field" has the keyboard focus.
-> NVDA announces: "Frame with two text fields, filler, filler, Editable text field, edit, blank"
("filler" is the AccessibleRole of the Box. In my opinion, the "filler" announcement is not useful, but this is not the topic of this bug report.)
-> The text field with the label "Read-only text field" has the keyboard focus.
-> NVDA announces: "Filler, Read-only text field, edit, This text can not be changed".
-> NVDA does not announce that this text field is not editable.
Actual behavior:
On non-editable text fields, NVDA announces the role "edit" without the non-editable state.
Expected behavior:
On non-editable text fields, NVDA should additionally announce the non-editable state, e.g.: "edit, not editable".
System configuration
NVDA installed/portable/running from source:
installed
NVDA version:
Version: 2021.3.5
Windows version:
Version: 10.0.19042 Build 19042
Name and version of other software in use when reproducing the issue:
java version "18.0.1" 2022-04-19
Java(TM) SE Runtime Environment (build 18.0.1+10-24)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.1+10-24, mixed mode, sharing)
Other information about your system:
Java Access Bridge is enabled.
Other questions
Does the issue still occur after restarting your computer?
Yes.
Have you tried any other versions of NVDA? If so, please report their behaviors.
Yes. Same behavior.
If NVDA add-ons are disabled, is your problem still occurring?
Not applicable.
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Not applicable.
The text was updated successfully, but these errors were encountered: