-
-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NVDA seems to apply some kind of extra processing on label text before reading it #13102
Comments
Please retry this with the latest version of NVDA 2021.2. If the issue still persists it is possible that NVDA gets a wrong information from the Java app. To rule this out please inspect developer information for the combobox by pressing NVDA+F1 when it is focused. |
Thanks @lukaszgo1 , here's what I tried on my side:
I also added some logging on the Java side of things and the AccessibleContext specific for the combo box renderer properly returns the value of the item. So for that particular item with the description "(<image[^>\\n])\n([^>]>)" JAWS reads "less image left bracket....." and NVDA reads "slash n right bracket" so NVDA skips over that entire "<image[^>" part as if it has a regular expression applied over the original content which tries to filter out |
Hello |
@CyrilleB79 thanks for the interested, as I said in the reply above:
So I tested with both NVDA 2019.3.1 and 2021.2 and I have the same problem. JAWS 2021 does not have this problem. |
The regular expression which strips simple tags from JAB objects has been introduced in 07d46de, and then expanded to handle comboboxes in 76c3482. For the latter commit there is an issue #3755 which explains that JAB comboboxes can contain unneeded HTML tags which should be removed, but does not provide any examples. @michaelDCurran I understand this code was written ages ago,, but if you would be able to recall specific examples of applications where tags indeed need to be removed that would be most helpful. Also cc @jcsteh since the initial code was written by you. |
@lukaszgo1 thanks for the investigation, for extra clarity about our use case adding a screenshot with the part of the application where the combo box item is encountered: So as the text to find can contain regular expressions, the recent used items may contain "<" and ">" and they need to be read by NVDA. |
Image description for the screenshot: The screenshot is of a find & replace dialog. The focus is on a dropdown ComboBox, displaying the search history, where the focused item is |
My vague recollection is that some Swing controls (even in places like the
Java Control Panel) contained HTML in their labels/descriptions. I can't be
more specific than that, though.
|
@seanbudd thanks for providing the alternate description and sorry for not providing it myself. |
I think first of all, I'd install the current version of nvda to the drive
and then use that, so everyone is working from the same system. There are
sometimes oddities when you run it portably or just after the installer runs
but does not install.
Brian
***@***.***
Sent via blueyonder.
Please address personal E-mail to:-
***@***.***, putting 'Brian Gaff'
in the display name field.
Newsgroup monitored: alt.comp.blind-users
----- Original Message -----
From: "Radu Coravu" ***@***.***>
To: "nvaccess/nvda" ***@***.***>
Cc: "Subscribed" ***@***.***>
Sent: Monday, November 29, 2021 11:01 AM
Subject: Re: [nvaccess/nvda] NVDA seems to apply some kind of extra
processing on label text before reading it (Issue #13102)
… @lukaszgo1 thanks for the investigation, for extra clarity about our use
case adding a screenshot with the part of the application where the combo
box item is encountered: <img width="608" alt="Screen Shot 2021-11-29 at
12 59 00"
src="https://user-images.githubusercontent.com/1005979/143856188-bd4a6007-c033-4b64-b653-5b3926fa0d26.png">
So as the text to find can contain regular expressions, the recent used
items may contain "<" and ">" and they need to be read by NVDA.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#13102 (comment)
|
@Brian1Gaff I have the same problem with the latest NVDA snapshot I tested (Thu Dec 2 03:05:33 2021) |
Looking at the Oracle Java docs, it seems like for labels, buttons, check boxes and various other Java swing controls the way to define that the content contains HTML is to include a <html> tag at the start of the text. |
@mwhapples I agree with the proposed change. This would work in most cases. |
@raducoravu I have made an initial fix and merge request for this issue, could you test it as well and let me know if that fixes this for you. |
@mwhapples thanks for investing your time in fixing this, I tested the NVDA build produced for your pull requests, so if in a Java combo box drop down I have this entry:
NVDA now reads "less image greater n n greater greater". |
@raducoravu I think the punctuation you mention as not being spoken is due to the punctuation setting. When I have punctuation set to some I get the same result as you, however if I increase it to all punctuation then all characters are correctly spoken. Also regardless of the punctuation setting I do get all characters showing on my Braille display. So I think this is working as would be expected. |
@mwhapples thanks, right, I do not have much experience with NVDA settings I'm afraid. So I think this issue can be considered as done. |
) Fixes #13102 Summary of the issue: NVDA was incorrectly stripping text from Java widgets if the text looked like an XML tag. According to the Oracle Java docs, when using HTML in a Java widget you should start the text with the <html> tag. Description of how this pull request fixes the issue: This change gets NVDA to check if the text starts with <html> and only then will remove any text which appears to be XML tags.
Steps to reproduce:
I have a problem is with a combo box which holds a history of regular expressions in a Java application, NVDA does not properly read the text for each entry.
As an example I have a Java application which I'm running with the Java access bridge enabled:
When I move the focus in the combo drop down list on the second entry NVDA should read "less than image square bracket....". But somehow it skips the content all the way to the first ">". So NVDA might to apply some kind of regular expression which removes what it considers to be "<tags>" from the content before reading it.
Actual behavior:
NVDA does not read the entire content of the "(<image[^>\\n])\n([^>]>)" value set on the label.
Expected behavior:
NVDA should read the label content as it is, as the label is not HTML aware.
System configuration
NVDA installed/portable/running from source:
Yes
NVDA version:
nvda_2019.3.1
Windows version:
10
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.
No
The text was updated successfully, but these errors were encountered: