Re: how to make a control more accessible

Travis Siegel
 

Yeah, but the problem is that if I use an embedded chrome browser, I need to ship extra crap with my program, and from my experience, the more stuff you include, the more problems people have with it, (because they have a tendency to knowingly (or otherwise) break things.  I'd much rather use a windows embedded control even if it isn't the best possible solution, because then there's fewer things to break.

And, yes, it's ebook reading software.  I don't know about anyone else, but I got fed up with the inaccessible epub reading software out there, because I couldn't find a single epub reader that did the job simply, easily, and was 100 percent accessible.  I normally just extract the epub files myself, and read them in my browser, but I've run across a few epub files that have what amounts to random garbage for file names, and determining the order of reading was problematic, so that kind of nixed the browser reading process I usually use.  Those are the main reason I set out to write this piece of software.

If nobody else uses it, that's ok with me, it solves a problem I have, and really, that's all that's necessary.  I'm just trying to make it more user friendly, so that I can release it and allow others to use it as well.

If I can't find a way to do that, then I'll leave it as is, but I just know I'm going to get complaints because it doesn't read automatically, or because it doesn't handle broken epub files, or because it doesn't read outloud, or any number of other issues I haven't even thought of yet.

Folks really tend to blow up if it works well for one screen reader, but not for another one, so that's why the questions here.  I have no trouble making it work perfectly with jaws, and I'd really like to have that same transparency with NVDA, since that's my screen reader of choice, and it's kind of sad that I'd release a program that works better on a screen reader I don't even use.

On 8/14/2019 3:55 AM, James Scholes wrote:

I don't want to stress overly on this, but when you say "next chapter", it sounds like you're creating some sort of reading software.  If it's for eBooks, that really strengthens the case for a better browser engine.  There's no reason an embedded Chrome browser can't work across multiple versions of Windows.

Regards,

James Scholes

On 14/08/2019 at 12:34 am, Travis Siegel wrote:
It's actually calling routines in the ATL.DLL windows library file.  Two routines from that dll initialize and process the html view.

The atl.dll file on my windows 8.1 system has a file stamp of 2014, so it's a relatively old dll to be sure.  But, that means this code will work on just about any version of windows, which was my primary intent when I started the project.  Admittedly, I didn't have a clue how to do what I wanted (I.E. embed an html control into my program) when I started, but via some heavy use of google, and a bit of searching on my favorite programming sites, I found this little gem that was only a couple functions, a couple api calls, and poof, exactly what I wanted.

Interestingly enough, under jaws, if I tell jaws that the control is an html area, it behaves properly, (which it most certainly did not do before doing so).  In fact, before I told jaws it was an html control, jaws couldn't even find the text on the screen.  To fix that problem, I had to add the html area to the tab order, then tell jaws it was anhtml control, after that, jaws works like a dream, pressing the button (or hot key) to go to the next chapter starts jaws reading the text automatically just as soon as it comes up on the screen.

I was hoping I could do something similar for NVDA.

Especially, since NVDA doesn't suffer from the issue of not knowing the html control is on the screen, it finds it just fine, and I can even read it, but again, I have to use the numpad keys to work my way through the text.  Interestingly enough, NVDA doesn't seem to know about the various headers, links, and other html elements in the text, but jaws not only sees them, but alows me to click on them as if it were an actual browser.  I'm not real happy with that result, since it means NVDA is being shown up at something it initially has a much better handle on, so if I could tell NVDA this is an html area, and allow it to behave accordingly, I'm fairly certain all would work like a treat.

I just don't know how to do that.


On 8/13/2019 5:50 PM, James Scholes wrote:

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.