Re: how to make a control more accessible

James Scholes
 

It may be helpful in this instance to have a runnable sample. However, straight off the bat, I'd recommend using a more up-to-date rendering engine for your web view (Chromium would be ideal for instance via CEF).

What environment is creating the web view? Is it a standard Win32 app? WPF? WinForms? UWP? Something else?

Regards,

James Scholes

On 13/08/2019 at 9:21 pm, Travis Siegel wrote:
I have a program I'm working on that has an html view as part of it's main screen.  NVDA reads the text well enough, but it doesn't read it well, in that it breaks lines at unexpected places, and it doesn't show embedded links.  The links isn't really a problem, since I'm not really concerned with links pointing elsewhere anyhow, so that's only a minor issue, but I would like to know how to get NVDA to treat this text area as html text, so it will pay attention to things like headers, and handle the reading a bit better, since now it's reading the text in the window in fragments, and most of the time, those fragments aren't making sense.
Admittedly, I'm not sure how much control I have over the presentation of the text, since it's an imported one, (it calls a windows dll/api to render the text), but when I look at the text line by line, it seems odd to me where NVDA is choosing to put breaks, as well as the fact that the read to end function in NVDA doesn't work.  This at least is one thing I'd really like to fix, since reading is the primary purpose of the app.  I'll include the nvda-F1 text below for the control, perhaps someone here can help me figure out what I need to do to make it work better, whether it be via NVDA plugins, or just adding attributes to the window. There's only so much I can do programatically, since it's an api/dll call, but I'm certainly open to suggestions.  It works as is, but reading the text requires the nvda cursor, not the system one, and I know some folks aren't going to like that, so again, any suggestions would be appreciated.
** cut here **
Developer info for navigator object:
name: u'Copyright'
role: ROLE_DOCUMENT
states: STATE_READONLY
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.Dynamic_EditableTextWithoutAutoSelectDetectionBodyMSHTMLIAccessible object at 0x05256770>
Python class mro: (<class 'NVDAObjects.Dynamic_EditableTextWithoutAutoSelectDetectionBodyMSHTMLIAccessible'>, <class 'NVDAObjects.behaviors.EditableTextWithoutAutoSelectDetection'>, <class 'editableText.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.IAccessible.MSHTML.Body'>, <class 'NVDAObjects.IAccessible.MSHTML.MSHTML'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: None
location: RectLTWH(left=412, top=186, width=759, height=628)
value: ''
appModule: <'appModuleHandler' (appName u'reader', process ID 1084) at address 52567b0>
appModule.productName: exception: No version information
appModule.productVersion: exception: No version information
TextInfo: <class 'NVDAObjects.IAccessible.MSHTML.MSHTMLTextInfo'>
windowHandle: 2556670
windowClassName: u'Internet Explorer_Server'
windowControlID: 0
windowStyle: 1442840576
windowThreadID: 6488
windowText: u''
displayText: u''
IAccessibleObject: <POINTER(IAccessible) ptr=0x9039038 at 5085170>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=2556670, objectID=None, childID=0
IAccessible accName: u'Copyright'
IAccessible accRole: ROLE_SYSTEM_PANE
IAccessible accState: STATE_SYSTEM_READONLY, STATE_SYSTEM_VALID (64)
IAccessible accDescription: exception: (-2147467263, 'Not implemented', (None, None, None, 0, None))
IAccessible accValue: u'file://C:\\books\\storybundle\\Adventure\\Singularity - Bill DeSmedt\\OEBPS\\copyright.xhtml'
MSHTML node has ancestor IAccessible: False
MSHTML nodeName: u'body'
** cut here**
I'm actually not sure why it's claiming it's an editable object, because it's most certainly not editable <frown>
The rest seems to be correct though.

Join nvda-devel@groups.io to automatically receive all group messages.