nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.09k stars 631 forks source link

NVDA does not announce empty items in JComboBox as empty (JAB) #14327

Open anOolamr opened 1 year ago

anOolamr commented 1 year ago

If an item of a JComboBox is empty (an empty String), NVDA does not announce this item as empty, whether the item is initially selected or is selected within the dropdown list. Other screen readers announce the empty item as "empty".

I wrote a simple application Test_JComboBox_with_emtpy_item.jar and attached it to this bug report. (If you prefer a .java file, you can find it within the .jar file.) Test_JComboBox_with_emtpy_item.zip

Steps to reproduce:

  1. Extract the Test_Disabled_Button_Announcement.jar file from the linked .zip file and execute the attached .jar file with an up-to-date JRE version. The application opens a frame containing two JComboBox components and their labels. The combobox with the label "Color 1:" has the keyboard focus.

  2. Open the dropdown list with the keystroke Alt + down arrow and navigate with the down/up arrow keys in the list. The list contains five items where one item is an empty String. If the dropdown list is opened and the list selection moves to the item with the empty value, NVDA does not announce it as "empty".

  3. Press the Tab key once. The combobox with the label "Color 2:" got the keyboard focus. The initial selected value of the this combobox is an empty String. NVDA does not announce the empty value as "empty".

Actual behavior:

(I got a German speech output and translated it to English. Maybe the English speech output is a little different.)

Color 1: Combobox Yellow collapsed List Yellow selected 1 of 5 [...] List item selected 5 of 5

Color 2: combobox collapsed

Expected behavior:

Color 1: Combobox Yellow collapsed List Yellow selected 1 of 5 [...] empty selected 5 of 5

Color 2: combobox empty collapsed

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

Version 2022.3.1

Windows version:

Microsoft Windows 10 Enterprise Version 10.0.19044 Build 1904

Name and version of other software in use when reproducing the issue:

java version "17.0.4" 2022-07-19 LTS Java(TM) SE Runtime Environment (build 17.0.4+11-LTS-179) Java HotSpot(TM) 64-Bit Server VM (build 17.0.4+11-LTS-179, 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.

Same behavior in previous versions of NVDA.

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.

feerrenrut commented 1 year ago

empty introduces another kind of ambiguity. We would accept removing the "list item" speech, and just reporting "selected 5 of 5" since there is no name / content.

An extension to this would be to introduce an earcon (a sound played in place of the list item name/content) to indicate that the name/content is empty.

anOolamr commented 1 year ago

What will NVDA announce when the JComboBox with an empty value (and collapsed list) receives the keyboard focus? (NVDA announces the position information only when the list is expanded.) If NVDA does not announce anything for an empty value this will not solve the issue which is also an accessibility issue.

The option to play an earcon may be helpful when using speech output, but it is not accessible to deafblind users as long as the empty value is not transferred (character based) to the braille output.

For an empty JTextField NVDA announces the "empty" value. What about announcing "empty value" or "empty item" for the JComboBox?

anOolamr commented 1 year ago

I checked the English speech output and noticed that NVDA uses "blank" for an empty JTextField. Are there any concerns to use "blank" for the empty combo box item?

mwhapples commented 1 year ago

As sometimes comboboxes can be made editable and thus at that point NVDA would say blank, it seems reasonable to me to extend that to selecting items. Also in firefox in the address bar combobox if I press down and then up, NVDA announces blank then, so looks like there is already some examples doing as you say.

feerrenrut commented 1 year ago

Reporting "blank" also introduces ambiguity, but the exact meaning of "blank" and how to handle its various ambiguities is an ongoing discussion.

An empty comboBox item is a bug in the Java application. The best that can be done is to mitigate confusing aspects introduced by NVDA. One confusing aspect is the inconsistency of speaking "List item" in this case, which is not reported for items with a name, and doesn't add information given the context of the Combo box that has already been reported.