-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Some UIA text ranges have no apparent bottom #12808
Comments
Also CC @carlos-zamora (he is implementing according to Word's behaviour in conhost as part of microsoft/terminal#11122). |
A few notes from my findings:
This leads me to believe that there might have been a change in design or expected behavior for UIA. Nonetheless, I'm inclined to say that this is the correct behavior as I have yet found a UIA text provider that behaves differently. |
@codeofdusk Can you reproduce this with older versions of NVDA? |
Looking around, I agree with the assessment by @carlos-zamora that much of the review cursor code was written without taking UIA into account (it's been present since at least commit 200bf5c in 2009). Changing the code in |
Closes #12808. Summary of the issue: In Microsoft Word, new builds of Windows Console, and Edgium with UIA enabled, "bottom" is not reported when moving past the end of the document in review. These providers return nonzero when moving collapsed textInfos forward past the end, but simply set them to the exclusive end of the document. Description of how this pull request fixes the issue: When moving forward by word or line, maintain the old position and verify that the new position is after the previous. Testing strategy: Tested in affected modern providers, notepad with MSAA, Chrome with IA2, and the MS Word object model. Co-authored-by: Michael Curran <mick@nvaccess.org> Co-authored-by: buddsean <sean@nvaccess.org>
Steps to reproduce:
In various modern UIA text providers (notepad with UIA forceably enabled with
nav.appModule.isGoodUIAWindow = lambda hwnd: True
in console), an upcoming/private build of conhost, and Word/Edgium with UIA enabled):Actual behavior:
The review cursor is moved to the end of the current line, and "bottom" is not announced. Technical:
UIATextInfo.move
(IUIAutomationTextRange::move
) returns 1.Expected behavior:
"bottom" is announced.
Context:
It seems that, per Microsoft Word's behaviour (other UIA providers are copying this): when moving a degenerate (collapsed) range past the end of the document, the correct UIA behaviour is to permit the move and move to the end of the requested unit, whereas expanded ranges should not permit the move when attempting to go past the end. Is this correct UIA behaviour (the docs seem unclear) and therefore an NVDA bug, or are providers incorrectly implementing this (so I should raise it upstream)? Cc @csauls, @michaelDCurran and @LeonarddeR.
The text was updated successfully, but these errors were encountered: