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: Make UIA the default for Windows 10 1803 and later #9771

Merged
merged 20 commits into from
Aug 2, 2019

Conversation

codeofdusk
Copy link
Contributor

@codeofdusk codeofdusk commented Jun 18, 2019

Link to issue number:

Builds on #9614. Closes #673 and #6291.

Summary of the issue:

NVDA's UIA console support significantly improves performance and stability, so we should enable it by default.

Description of how this pull request fixes the issue:

While UIA in consoles was added in Windows 10 1709, the initial implementation left much to be desired, particularly concerning caret movement and expansion to character.

A new UIAUtils.shouldUseUIAConsole function has been added which determines whether to use UIA in consoles:

  • If the user has explicitly chosen to use UIA or legacy console support, the function returns True or False respectively.
  • Otherwise, if the user is running at least Windows 10 1803, the function returns True, or False if not.

The "use UI Automation in the Windows Console when available" GUI setting has been changed to expose all options in the config spec (i.e. to automatically detect UIA/legacy or override this autodetection).

Testing performed:

Tested the new GUI setting on Windows 10 1903.

Known issues with pull request:

None.

Change log entry:

== New Features ==

@codeofdusk
Copy link
Contributor Author

@josephsl
Copy link
Collaborator

josephsl commented Jun 18, 2019 via email

Copy link
Collaborator

@LeonarddeR LeonarddeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see that this is getting in to shape.

source/UIAUtils.py Outdated Show resolved Hide resolved
source/UIAUtils.py Outdated Show resolved Hide resolved
source/_UIAHandler.py Outdated Show resolved Hide resolved
source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
source/gui/settingsDialogs.py Show resolved Hide resolved
source/gui/settingsDialogs.py Outdated Show resolved Hide resolved
user_docs/en/userGuide.t2t Outdated Show resolved Hide resolved
source/gui/settingsDialogs.py Show resolved Hide resolved
@codeofdusk codeofdusk changed the title UI Automation in Windows Console: Make UIA the default for Windows 10 1809 and later (except 1903) UI Automation in Windows Console: Make UIA the default for Windows 10 1809 and later Jun 19, 2019
@codeofdusk codeofdusk changed the base branch from threshold to master June 19, 2019 04:34
@codeofdusk codeofdusk force-pushed the cmduia5-makedefault branch from 8042351 to 322cd03 Compare June 19, 2019 04:35
@codeofdusk
Copy link
Contributor Author

Once #9773 is merged, I think this PR is ready for master (pending code review, of course).

@lukaszgo1
Copy link
Contributor

It might be worth to have some discussion about when issue is considered closed. In my view one of the following should happen:

  1. The issue is fixed - doesn't apply to any of the bugs listed above.
  2. The issue is impossible to fix - also not applicable because whine proper fixes aren't easy in these cases it is doable.
  3. The product which is affected by the issue is either EOL or NVDA developers decided to no longer support it. It is important to point out that both Windows 7 and Windows 8.1 would be supported by Microsoft until ad least 2023, and LTSB version of Windows 10 1607 on which Server 2016 is based until 2026.

In short I am against closing issues with the previous console implementations until they are properly fixed. The same has been done when UIA for Word was introduced - no one closed any bug report for COM implementation.

@codeofdusk codeofdusk changed the title UI Automation in Windows Console: Make UIA the default for Windows 10 1809 and later UI Automation in Windows Console: Make UIA the default for Windows 10 1803 and later Jun 25, 2019
@feerrenrut
Copy link
Contributor

@lukaszgo1 Could you be specific about which issue you don't think should be closed to make sure we are on the same page?

@lukaszgo1
Copy link
Contributor

@feerrenrut well I meant all tickets listed in the PR description by @codeofdusk namely: #513, #673, #1682 and #6291.

@feerrenrut feerrenrut dismissed LeonarddeR’s stale review July 16, 2019 11:15

All actions addressed.

@AppVeyorBot
Copy link

PR introduces Flake8 errors 😲

See test results for Failed build of commit 88a335629f

@AppVeyorBot
Copy link

PR introduces Flake8 errors 😲

See test results for Failed build of commit 0e77fe664a

Copy link
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @codeofdusk

@feerrenrut feerrenrut merged commit 216e476 into nvaccess:master Aug 2, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Aug 2, 2019
feerrenrut added a commit that referenced this pull request Aug 2, 2019
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Jan 14, 2020
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Jan 14, 2020
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Jan 14, 2020
codeofdusk added a commit to codeofdusk/nvda that referenced this pull request Jan 14, 2020
michaelDCurran pushed a commit that referenced this pull request Jan 14, 2020
* Fully revert #9771.

* Remove import

* Fix accelerator, typedCharacter in UIA console

* Style.

* More style, except spacing of binary operators (to preserve consistency, as fixing this seems out of scope for this PR).

* Also fix palcement of binary operators.

* Actually, keep winConsoleUIA module from #9771.

* Remove extra and.

* Add an and.

* Keep auto as the config default.

* Style.
seanbudd pushed a commit that referenced this pull request Jun 21, 2022
…(Windows 11 Sun Valley 2) (#10964)

Supersedes #9771 and #10716. Closes #1682. Closes #8653. Closes #9867. Closes #11172. Closes #11554.

Summary of the issue:

Microsoft has significantly improved performance and reliability of UIA console:
* microsoft/terminal#4018 is an almost complete rewrite of the UIA code which makes the console's UIA implementation more closely align with the API specification.
* microsoft/terminal#10886, microsoft/terminal#10925, and microsoft/terminal#11253 form a robust testing methodology for the UIA implementation, including bug fixes in response to newly added tests based on Word's UIA implementation.
* microsoft/terminal#11122 removes the thousands of empty lines at the end of the console buffer, significantly improving performance and stability. Since all console text ranges are now within the text buffer's bounds, it is no longer possible for console to crash due to the manipulation by UIA clients of an out-of-bounds text range.
* Countless other accessibility-related PRs too numerous to list here.

We should enable UIA support on new Windows Console builds by default for performance improvement and controllable password suppression.

Description of how this pull request fixes the issue:

This PR:
* Exposes all three options for the UIA console feature flag in the UI (replaces the UIA check box with a combo box).
* Adds a runtime check to test if `apiLevel >= FORMATTED`, and use UIA in this case when the user preference is auto. This is the case on Windows 11 Sun Valley 2 (SV2) available now in beta and set for release in the second half of 2022.
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.

Problems with command consoles and object navigation
7 participants