Skip to content
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 doesn't correctly report the count of treeview items in the Registry Editor #4611

Closed
nvaccessAuto opened this issue Nov 9, 2014 · 5 comments

Comments

@nvaccessAuto
Copy link

Reported by k_kolev1985 on 2014-11-09 11:05
Description:
I've noticed that in the Registry Editor of Windows 8.1, NVDA doesn't correctly announce the count of items in the treeview. When expanding an item, NVDA always reports that there are 0 items, though there is at least 1 item in the expanded group. When moving through the items in a group (in the treeview), NVDA always reports the currently selected item as "1 of 1", though apparently the item is not the only one in that group. Microsoft Narrator correctly reports the current item's index (e.g. if there are 5 items in the group and the 2nd is selected, Narrator correctly reports "2 of 5").

Steps to reproduce it:

  1. Open Registry Editor in Windows 8.1.
  2. If the focus is not in the treeview of categories/groups, move it there with the TAB key.
  3. Navigate in the treeview with the arrow keys: Move up and down through the items; collapse and expand groups.

Actual results:

  • MVDA incorrectly reports that there are 0 items in an expanded group.
  • NVDA incorrectly reports the currently selected item's index of being "1 of 1", instead of the actual item position (e.g. "2 of 5").

Expected results:

  • NVDA should correctly report the number of items in an expanded group.
  • NVDA should correctly report currently selected item's index/position.

Test environment:

  • Operating system: Windows 8.1 Pro N, 64-bit, in Bulgarian with all locale settings set to "Bulgarian".
  • NVDA version: next-11237,f87ed4d; 2014.3.
@LeonarddeR
Copy link
Collaborator

Confirmed for windows 10 registry editor. However, when i disable "Guess object position information when unavailable", position information is not announced. This means that NVDA has to guess based on a particular algorithm, and that algorithm fails here.

I'm leaning towards a won't fix. @jcsteh, thougths?

@jcsteh
Copy link
Contributor

jcsteh commented Jul 27, 2017

This only occurs in the 64 bit registry editor; I just tested it with the 32 bit version and it works as expected. We can map from an IAccessible child id to an HTREEITEM (so this must be CommCtrl >= 6). At a guess, I'd say bits are being truncated from the 64 bit handle when the response comes back as 32 bit in this case.

This doesn't explain why this works just fine in, say, Device Manager. My only guess is that there aren't as many nodes (and the tree isn't as dynamic), so we don't end up with 64 bit handles. Regardless, we would definitely hit this 64 bit truncation problem at some point.

This will either need the SendMessage part of #3339 or perhaps we can use UIA for all 64 bit SysTreeView32 controls.

CC @michaelDCurran.

@Adriani90
Copy link
Collaborator

cc: @Robert-J-H, @ABuffEr

@Robert-J-H
Copy link
Contributor

For 64 bit, the mapping function is not implemented. I've consulted the UIA source code. They are essentially traversing the children, almost the same as we do.
However, the procedure is highly inefficient.
for each focus change (e.g. arrowing around), the position under the parent is being enumerated and likewise the total number of children (similar items in group).
There are possible solutions for this.

  1. caching. Should be valid for as long as accChildCount stays the same (it returns all children seen so far, not just those on one level, i.e. it changes only if a level is freshly expanded, collapsing doesn't reset the counter.)

  2. Make an initial guess through the location. The difference between parent and next parent divided by the item height gives an approximation of the total amount of children. the accessibleChildren function (oleacc) can return all IDs for that range, it is trivial to apply accValue (gives the tree level) in order to count the objects at the same level as the focused item.

  3. limit the enumeration to at most xxx elements or given time out (Narrator seems to do that).
    However, this issue is at any rate a duplicate, we've discussed something along these lines elsewhere.

@Adriani90
Copy link
Collaborator

I am closing also this one in favor of #7041 because the discussion goes much further in detail on that issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants