Open Tomez81 opened 2 years ago
Can you confirm that this is an issue with a real braille display, not just braille viewer?
Yes I've tested it with a real braille display too
This is a WX issue reported in https://github.com/wxWidgets/wxWidgets/issues/10771 and in https://github.com/wxWidgets/wxWidgets/issues/18683
Note that this affects all screen readers for Windows.
Thanks for the response, I had't check wxPython in depth because, until now, we had used a ctrl derived from wxStyledTextCtrl in our software with JAWS and it hadn't show any issues. I've just double checked the script above with JAWS 2022 and all works on the braille display.
I've also checked the script with "Accessibility Inside For Windows" and, even if the result is not equal to notepad++ it seems to give a bunch of informations to MSAA. Are you sure that there is no problem within the internal management of NVDA?
I had't check wxPython in depth because, until now, we had used a ctrl derived from wxStyledTextCtrl in our software with JAWS and it hadn't show any issues. I've just double checked the script above with JAWS 2022 and all works on the braille display.
Sorry for not being clear enough in my previous comment. What I wanted to say was that none of the screen readers for Windows are able to access the styled text control from WX the same way in which other Scintilla controls are accessed. JAWS works better in this case because its screen scraping code is better, ,more mature, so the control is accessed either via the mirror display driver on older versions of Windows, or via GDI hooks when the newer version of Windows is in use.
I've also checked the script with "Accessibility Inside For Windows" and, even if the result is not equal to notepad++ it seems to give a bunch of informations to MSAA.
Assuming you mend Accessibility Insights last time I looked it only supports UIA, and Scintilla has to be accessed via mix of MSAA and the custom code which sends windows messages to the control.
Are you sure that there is no problem within the internal management of NVDA?
It is probably possible to improve the NVDA's GDI hooks to provide the same level of access JAWS offers here, but more reasonable course of action would b to fix the issue in WX.
but more reasonable course of action would b to fix the issue in WX.
Hi, can you elaborate? Like what needs to be done? Or what knowledge is needed. Or can give some advice or information.
Thanks.
This seems to be fixed in the stc sample built with wxWidgets/master. I wonder if this will be fixed when the wxWidgets used by wxPython are updated?
styled_text_ctrl.SetBufferedDraw(False)
The problem can be solved manually with this method. But it is not generic. Until the wxWidgets used by wxPython are updated to 3.2.4, we need a generic way to solve such problems.
Is this really a fix making this control fully operational? In particular is selection announced? There is no way to solve this generically, someone has to spend their time understanding why this control falls back to the display model, despite being Scintilla based.
It doesn't seem to, it only solves the speech confusion problem.
Maybe something else to look at. Is the
wxStyledTextCtrl
correctly identified as Scintilla control? Spy++ says the classname ofwxStyledTextCtrl
will bewxWindow
with window captionstcwindow
.elif windowClassName in ("Scintilla","TScintilla"): from .scintilla import Scintilla as newCls
That may be one of the reasons.
After adding the windowClassName of wx.stc.StyledTextCtrl to judge the use of the Scintilla NVDAObject. wx.stc.StyledTextCtrl becomes inaccessible, NVDA doesn't speak or is blank.
name:
stcwindow
role:
EDITABLETEXT (8)
states:
FOCUSED, MULTILINE, FOCUSABLE (2, 1048576, 16777216)
value:
None
windowClassName:
wxWindowNR
windowControlID:
-31911
windowHandle:
1839760
location:
left: 244,
top: 287,
width: 763,
height: 212
pythonClass:
<class 'NVDAObjects.Dynamic_EditableTextLogContainerIAccessibleScintillaWindowNVDAObject'>
pythonClassMRO:
class 'NVDAObjects.Dynamic_EditableTextLogContainerIAccessibleScintillaWindowNVDAObject',
class 'globalPlugins.ndtt.logReader.EditableTextLogContainer',
class 'globalPlugins.ndtt.logReader.LogContainer',
class 'NVDAObjects.IAccessible.IAccessible',
class 'NVDAObjects.window.scintilla.Scintilla',
class 'NVDAObjects.behaviors.EditableTextWithAutoSelectDetection',
class 'NVDAObjects.behaviors.EditableText',
class 'NVDAObjects.behaviors.EditableTextWithSuggestions',
class 'NVDAObjects.behaviors.InputFieldWithSuggestions',
class 'NVDAObjects.behaviors.EditableTextBase',
class 'editableText.EditableText',
class 'NVDAObjects.window.Window',
class 'NVDAObjects.NVDAObject',
class 'documentBase.TextContainerObject',
class 'baseObject.ScriptableObject',
class 'baseObject.AutoPropertyObject',
class 'garbageHandler.TrackedObject',
class 'object'
Steps to reproduce:
Execute the script below (I've tested it with python 3.7 and wxPython==4.1.1)
Write some text ex. "Hello world" on the first row then press Enter On the second row write "Hi"
Actual behavior:
In NVDA braille viewer the content with the cursor on the second row is: " Hi llo world"
It seems in general that after the end of the row it concatenates the remaining characters from the longest row of the control.
Expected behavior:
In NVDA braille viewer the content with the cursor on the second row should be: "Hi"
In Notepad++ (Also derived from Scintilla) the same test works fine.
NVDA logs, crash dumps and other attachments:
Not applicable
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
2022.2
Windows version:
Windows 10 Pro Version: 21H2 Build: 19044.1826
Name and version of other software in use when reproducing the issue:
Not applicable
Other information about your system:
Not applicable
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
If NVDA add-ons are disabled, is your problem still occurring?
Yes
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes