UI Automation in Windows Console: use UIATextInfo in known-good cases#12425
Closed
codeofdusk wants to merge 1 commit into
Closed
UI Automation in Windows Console: use UIATextInfo in known-good cases#12425codeofdusk wants to merge 1 commit into
codeofdusk wants to merge 1 commit into
Conversation
|
See test results for failed build of commit 3489a9c339 |
|
See test results for failed build of commit 3489a9c339 |
e3a6533 to
0123974
Compare
0123974 to
69b5597
Compare
Contributor
Author
|
Closing in favour of a new strategy using #12660. |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Blocked by microsoft/terminal#6986.
Closes #12130.
Might help #11172.
Supersedes #11495.
Summary of the issue:
Before recent upstream work, NVDA needed a custom
TextInfoimplementation including workarounds for the console. Notably, it was necessary to restrict the text range to visible content, as the console contained thousands of empty lines which both slowed down diffing and disorientated the user. With the resolution of microsoft/terminal#6986, this is no longer necessary as the console's UIA text range now ends at the last actual character (i.e. no more extraneous empty lines).This bounding to the visible ranges can sometimes lead to choppy speech output, as full screen refreshes (such as in pagers or full-screen editors) cause text discontinuity, resulting in the diff algorithms losing context about which parts of the text are new. It breaks precedent from the rest of NVDA: in Word or web documents, for instance, the review cursor is not bounded to the visible text and the entire document can be freely explored. Despite the documentation of the scrolling commands in the user guide, the need to scroll consoles in particular, in strict contrast to the behaviour in other applications, has caused user confusion (microsoft/terminal#6453 and private correspondance with various users) and the commands don't work consistently in any case. In microsoft/terminal#6453 (comment) it was pointed out that consoles can have text that appears below the visible content, which is currently inaccessible to NVDA due to bounding.
Description of how this pull request fixes the issue:
textInfoworkarounds atConsoleUIATextInfoWorkaroundEndInclusive.isImprovedTextRangeAvailable) to use the defaultTextInfoimplementation (i.e. no customization at the UIA text range level).ConsoleUIATextInfobut keeps the name to maintain backwards compat.Testing strategy:
With NVDA developer info (NVDA+f1), verified that:
isImprovedTextRangeAvailable:UIATextInfois used.isImprovedTextRangeAvailable:ConsoleUIATextInfoWorkaroundEndInclusiveis used.UIATextInfois used.Also manually verified that new and old UIA console work as expected.
Known issues with pull request:
None.
Change log entries:
== Changes for Developers ==
NVDAObjects.UIA.WinConsoleUIA.ConsoleUIATextInfohas been deprecated, useNVDAObjects.UIA.UIATextInfoinstead. (UI Automation in Windows Console: use UIATextInfo in known-good cases #12425)isImprovedTextRangeAvailableisFalse), continue to useConsoleUIATextInfoWorkaroundEndInclusive.Code Review Checklist: