-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Treeview items: NvDA does not report item count and other object navigation oddities due to bad MSAA implementation in some tree views #7041
Comments
These are Windows common tree view (SysTreeView32) controls. It does not
happen with all of them; e.g. it doesn't happen in Device Manager. I don't
understand what the difference is between the working and non-working
controls yet.
|
Is this a regression (is there some past version of nvda where this behaved as expected with the steps to reproduce)? |
Sorry, unfortunately I can not remember from what moment the problem started. |
This issue has existed in the Registry Editor for years now. I wasn't aware it also happened elsewhere. @fernando-jose-silva, have you seen it anywhere else other than the two examples you gave? Technical: Some findings from a quick investigation:
@michaelDCurran, any thoughts? P3 because this does not occur in many places as far as I know. Also, while item counts are useful, they're not essential. |
Thank you very much for your attention. |
Places where it occurs as well are: CCleaner, Eclipse. |
@jcsteh I have tested back until NVDA 2009.1. Until back to 2010.2, NVDA says 1 of 1 although there are more than 1 elements in the tree. In 2010.1 and earlier, NVDA says 0 of 1 everytime. But there is no version where NVDA counts correctly the item in such tree views. Tested with Narator, it works properly. |
I generally use master/alpha, and I'm quite sure that for a short period the counting in registry worked well. I cannot provide more details, unfortunately. |
Ah I have tested only in the ccleaner tree view. I will test on regedit as well.
Von meinem iPhone gesendet
… Am 06.01.2019 um 19:27 schrieb Alberto Buffolino ***@***.***>:
I generally use master/alpha, and I'm quite sure that for a short period the counting in registry worked well. I cannot provide more details, unfortunately.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi, Update: Testing with 32-bit and 64-bit Registry editor in Windows 10 version 1809 confirmed something I've been meaning to track down for a while: the root of this family of issues is IPC (inter-process communication) issue between a 32-bit screen reader and a 64-bit binary. It was resolved last year when Robert's pull request was merged for a few days, then it disappeared when development branch reorganization took place in July 2018. Regarding Eclipse tree view problem, it is blocked not only by this issue, but also because of JAB. Can we boost the priority of this and integrate Robert's pull request into Core as soon as possible, provided that there are no issues with that PR? Thanks. |
the pull request from @Robert-J-H is #8190. It seems there is an assertion error. Thanks. |
Hi, Correct, added due to location helper work. Upon further testing, it appears Robert's pull request won't help here, as list views and tree views are two different controls. Also, for affected tree view items, position info property returns wrong item count (perhaps that might be the key we're looking for). Thanks. |
Hi But some do work and thus we don't have a 64-bit issue here but rather a poor implementation through MS. The consequence is that all object navigation won't work. NAVDIR_DOWN Note that the descriptions here do not correspond to tree views, e.g. Up and Down is what we would use for previous/next.
|
Hi, This fails on Device Manager, as ID's can be randomly assigned, and MMC (the program that hosts Device Manager) is a 64-bit program on 64-bit Windows. Thanks. |
Device Manager works out of the box, doesn't it.
It is always possible to iterate in both directions until higher
levels (the accValue) or the end of the list is reached.
The shortcut is only for regedit.exe/regedt32.exe which could have
hundreds of keys listed, e.g. GUIDs.
The main point is that obj.next/previous do really work again.
…On 07/01/2019, Joseph Lee ***@***.***> wrote:
Hi,
This fails on Device Manager, as ID's can be randomly assigned, and MMC (the
program that hosts Device Manager) is a 64-bit program on 64-bit Windows.
Thanks.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7041 (comment)
|
Hi all, As a starting point, I'll create an app module for Registry Editor that'll incorporate the algorithm described by Robert to be used in 64-bit RegEdit.exe. Once we find more tree views with bad MSAA implementation and if we can locate a pattern for them, then we should consider creating a built-in overlay class. Thanks. |
Other tree views with similar symptoms:
Thanks to @josephsl for taking that over. |
Besides, could one correct the title of this issue? Thanks. |
Hi, I have incorporated the algorithm proposed by Robert in internal descriptors used in object navigation routines (obj.next/previous/parent/firstChild), thus resolving object nav issue. At the moment I'm trying to figure out the efficient way to calculate child count, as there is a noticeable lag when opening a large top-level subkey (hive) such as HKCR (HKEY_CLASSES_ROOT) in 64-bit Registry Editor (that hive alone contains over 5000 subkeys on my computer). Also, the implementation detail might be changed:
Thanks. |
Hi |
Hi, No, obj.parent... method won't work if:
Thanks. |
Hi, Regarding winreg method (renamed to just winreg in Python 3, by the way), one needs to construct the path to a specific key/subkey by traversing through ancestors. Although it'll work for 64-bit RegEdit, it isn't quite generic enough at this point. As for my statement on child count inefficiency, childCount descriptor as defined in NVDAObjects.IAccessible.IAccessible will work. This works for small number of children, but it fails for items with hundreds and thousands of children because it needs to build an array of children (very slow in MSAA, faster via UIA but UIA implementation for these tree views is broken in a major way such as not giving us state change information). Also, accChildCount may or may not work because it could return bad child count (overestimating and underestimating in some cases). Note that inefficient child count for thousands of subitems is not unique to 64-bit Registry Editor: there is a slight lag when obtaining child count for HKCR in 32-bit RegEdit, too (HKEY_CLASSES_ROOT holds information about file extensions and such, and is a completely different hive than HKEY_USERS). Thanks. |
On 11/01/2019, Joseph Lee ***@***.***> wrote:
Hi,
Regarding winreg method (renamed to just winreg in Python 3, by the way),
one needs to construct the path to a specific key/subkey by traversing
through ancestors. Although it'll work for 64-bit RegEdit, it isn't quite
generic enough at this point.
As for my statement on child count inefficiency, childCount descriptor as
defined in NVDAObjects.IAccessible.IAccessible will work. This works for
small number of children, but it fails for items with hundreds and thousands
of children because it needs to build an array of children (very slow in
MSAA, faster via UIA but UIA implementation for these tree views is broken
in a major way such as not giving us state change information). Also,
accChildCount may or may not work because it could return bad child count
(overestimating and underestimating in some cases).
Similar with the tree view item count message.
It is mod 65536 and thus pretty unusable to get all key entries.
I've said explicitly "basical" for the procedure because it was for
the simplest case.
You have always to check the level of the resulting object for all
three possible Navigation directions.
For the parent: NavDir_up, NavDir_Previous and NavDir_Left.
Similar for the first child of the next parent. If the parent is
collapsed, you have to traverse backwards in a stairs-like fashion
until you reach the level of the item in question, i.e NavDir_Up/
NavDir_Left.
This gives you the last sub key included.
This should be very efficient despite the conditionals.
Note that inefficient child count for thousands of subitems is not unique to
64-bit Registry Editor: there is a slight lag when obtaining child count for
HKCR in 32-bit RegEdit, too (HKEY_CLASSES_ROOT holds information about file
extensions and such, and is a completely different hive than HKEY_USERS).
Well, I gave you a key with countable sub keys.
The former has 6800 items on my system.
Is there a repo for the appModule that I could fork?
Thanks
|
Hi, As for parent navigation: a while loop will work (that's what I have tried). As for a repo for regedit.py, I'm attaching the progress so far. At this point object navigation works (for the most part; there exists a bug where NvDA may appear to freeze when obtaining children of large tree nodes, but it shouldn't cause issues until we get item count sorted). The progress and the roadmap are as follows:
Note: the attached file is a text file. As far as content is concerned, it is a Python file, so you must rename the file extension. Thanks. |
Also, there is a struct defined in sysTreeView32 which doesn't seem to be used.
We should exploit its capabilities. |
Hi, I advise using the extended version of that struct if testing it. Thanks.
|
@josephsl
which sounds right.
which uses the simpler structure. I've also read a notify-message that explicitly uses TVITEMEX (in contrast to the comment). However, who am I to judge, I will have to try both. |
OK, I've tested the appModule a bit. The accNavigate with direction right should give us the first child. I've noticed also that Narrator cheats. The position info is only given for short level-groups and not for e.g. file extensions. |
Even if it was generic enough, this is not a pathway I would accept when reviewing.
I don't think the UIA implementation is broken. This is most likely caused by #8785. @michaelDCurran and I were aware of this while respectively writing/reviewing this patch, but decided that the advantages of introducing it were much more important than disadvantages like this. I guess you could find the SysTreeView32 entry in the UIA proxyFactoryMapping and ignore it when unregistering win events. |
It was only meant for checking the results. It is of course not generic since it doesn't handle other tree views.
Not being informed about state changes (especially checked/unchecked) is a very dangerous thing IMHO, e.g. when you're cleaning your system. However, from what I see with e.g. inspect.exe, UIA doesn't give you any advantages for e.g. regedit. I haven't tried the UIA checker from the Windows SDK though. |
Does UIA also expose the wrong information MSAA is suffering from? |
It returns for the most methods Null, e.g. parent, child and so on. |
Hi, |
Just confirming this issue still exists in both 2019.2.1 and the latest alpha 19128,df0211c4 (7th November 2019). Also, object navigation does not work in the tree view of the registry editor, it appears as if the treeview is a single object with no objects inside. |
Object Navigation works here normal for regedit. However, I'm running
the custom module.
…On 07/11/2019, Quentin Christensen ***@***.***> wrote:
Just confirming this issue still exists in both 2019.2.1 and the latest
alpha 19128,df0211c4 (7th November 2019).
Also, object navigation does not work in the tree view of the registry
editor, it appears as if the treeview is a single object with no objects
inside.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7041 (comment)
|
Which custom module are you using @Robert-J-H? |
Hi Quentin
I use the experimental regedit appmodule. Joseph did some preliminary
work based on my input and I extended it to include position info etc.
However, it's Python 2.7 and has probably to be migrated. Apart from
that, there are certain things I don't like, such as the very
ineffective position calculation.
NVDA counts all siblings when a new item is selected and that's very
time consuming for the registry where a branch can have several
thousand children. Some clever caching or memoization would be
adequate.
…On 15/11/2019, Quentin Christensen ***@***.***> wrote:
Which custom module are you using @Robert-J-H?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7041 (comment)
|
This is still duplicable with NVDA alpha-20005,14c2e2ec and Windows 10 Pro 64-Bit Version 2004 (OS Build 19041.207). As another example, the RSS feed tree view in Internet Explorer, accessible via Control+G, displays it -- all items there are "1 of 1 level 1" regardless of their position. |
We can provide a proxy DLL to call 64-bit UİA in the lib64. |
That would be fine, do you have any source code etc.
…On 01/08/2020, Ozancan Karataş ***@***.***> wrote:
We can provide a proxy DLL to call 64-bit UİA in the lib64.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7041 (comment)
|
Unfortunately no, but I think @michaelDCurran can help. |
This bug also occurs with the 64-bit, I.E> installed, versions of Team Talk classic, but not the 32-bit ones. |
Using the nvda master 13960 and windows 10 15063 when navigating through an ierarchical list, nvda does not correctly count the existing items in the level that is being traversed.
As an example, you can use the windows registry.
Test:
Open windows registry regedit.
Expand the computer level.
Press a down arrow, see that nvda will announce:
Level 1 HKEY_CLASSES_ROOT collected 1 of 1
When it would be expected that the nvda pronounces:
HKEY_CLASSES_ROOT level 1 collected 1 of 5
Since there are 5 items in this level.
I persisted this with other ierarchical lists in windows, as the list where you can choose the events to customize sounds in windows like (open program, close program).
The text was updated successfully, but these errors were encountered: