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: don't prefer UIA in consoles when a Braille display is in use #10514

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions source/UIAUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.


import braille
import operator
from comtypes import COMError
import config
import ctypes
import UIAHandler
from winVersion import isWin10


def createUIAMultiPropertyCondition(*dicts):
"""
A helper function that Creates a complex UI Automation Condition matching on various UI Automation properties with both 'and' and 'or'.
Expand Down Expand Up @@ -239,6 +242,11 @@ def shouldUseUIAConsole(setting=None):
return False
elif setting == "UIA":
return True
# #10191: Text review in the UIA console does not function properly
# in Braille, so don't prefer it when a display is connected until we
# can find a workaround.
if braille.handler.enabled:
return False
# #7497: Windows 10 Fall Creators Update has an incomplete UIA
# implementation for console windows, therefore for now we should
# ignore it.
Expand Down
4 changes: 2 additions & 2 deletions user_docs/en/userGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,8 @@ It does not affect the modern Windows Terminal.
In Windows 10 version 1709, Microsoft [added support for its UI Automation API to the console https://devblogs.microsoft.com/commandline/whats-new-in-windows-console-in-windows-10-fall-creators-update/], bringing vastly improved performance and stability for screen readers that support it.
In situations where UI Automation is unavailable or known to result in an inferior user experience, NVDA's legacy console support is available as a fallback.
The Windows Console support combo box has three options:
- Automatic: Uses UI Automation in consoles on Windows 10 version 1809 and later. This option is recommended and set by default.
- Prefer UIA: Uses UI Automation in consoles if available, even on Windows versions with incomplete or buggy implementations. While this limited functionality may be useful (and even sufficient for your usage), use of this option is entirely at your own risk and no support for it will be provided.
- Automatic: Uses UI Automation in consoles on Windows 10 version 1809 and later when a Braille display is not connected. This option is recommended and set by default.
- Prefer UIA: Uses UI Automation in consoles if possible, even in cases where implementation is incomplete or buggy. While this limited functionality may be useful (and even sufficient for your usage), use of this option is entirely at your own risk and no support for it will be provided.
- Legacy: UI Automation in the Windows Console will be completely disabled, so the legacy fallback will always be used.
-

Expand Down