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

UI Automation in Windows Console: Always use ConsoleUIATextInfo in UIA consoles #10052

Merged
merged 4 commits into from
Aug 13, 2019

Conversation

codeofdusk
Copy link
Contributor

@codeofdusk codeofdusk commented Aug 8, 2019

Link to issue number:

Fixes #10030. Related to #9614.

Summary of the issue:

NVDA incorrectly reports an empty selection when focusing Windows consoles.

Since the TextInfo property on consoles was prefixed with an underscore, NVDA dynamically selected the wrong TextInfo implementation (see NVDAObjects.UIA.UIA._getTextInfo). This means that when a console is first focused, UIATextInfo is selected instead of WinConsoleUIA.TextInfo, so our patched isCollapsed logic isn't used and speech.speakPreselectedText is called (see lines 391–393 in speech/__init__.py).

Description of how this pull request fixes the issue:

Assign the textInfo class as WinConsoleUIA.TextInfo rather than WinConsoleUIA._TextInfo.

Testing performed:

Tested steps from the issue and confirmed that no superfluous selections are reported.

Known issues with pull request:

None.

Change log entry:

None.

@codeofdusk
Copy link
Contributor Author

Cc @feerrenrut @LeonarddeR

@LeonarddeR LeonarddeR requested a review from feerrenrut August 8, 2019 11:59
codeofdusk and others added 2 commits August 12, 2019 15:55
Co-Authored-By: Reef Turner <feerrenrut@users.noreply.github.com>
@AppVeyorBot
Copy link

PR introduces Flake8 errors 😲

See test results for Failed build of commit d7784c33fc

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

Successfully merging this pull request may close these issues.

repetition when focusing a console window
5 participants