From 6b48d3ae057cf2940b6528fa230768988b6564a5 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Thu, 4 Nov 2021 18:23:18 -0400 Subject: [PATCH 1/3] Additional GUI/documentation fixes for UIA console by default. Follow-up of #13807. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Golonka --- source/gui/settingsDialogs.py | 5 +---- user_docs/en/userGuide.t2t | 14 +++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py index 2bb473e3554..dd376a9a567 100644 --- a/source/gui/settingsDialogs.py +++ b/source/gui/settingsDialogs.py @@ -2688,10 +2688,7 @@ def __init__(self, parent): # Translators: A choice in a combo box in the advanced settings # panel to have NVDA determine its Windows Console implementation # automatically. - # This option is currently equivalent to "legacy", but in a future - # version of NVDA, UIA will be used in known good implementations - # when this option is selected. - _("Automatic (legacy)"), + _("Automatic (prefer UIA)"), # Translators: A choice in a combo box in the advanced settings # panel to have NVDA use UIA in the Windows Console when available. _("UIA when available"), diff --git a/user_docs/en/userGuide.t2t b/user_docs/en/userGuide.t2t index 0748c2703ac..6162857118d 100644 --- a/user_docs/en/userGuide.t2t +++ b/user_docs/en/userGuide.t2t @@ -1052,10 +1052,11 @@ When in the table view of added books: NVDA provides support for the Windows command console used by Command Prompt, PowerShell, and the Windows Subsystem for Linux. The console window is of fixed size, typically much smaller than the buffer that holds the output. As new text is written, the content scroll upwards and previous text is no longer visible. -Text that is not visibly displayed in the window is not accessible with NVDA's text review commands. +On Windows versions before Windows 11 22H2, text in the console that is not visibly displayed in the window is not accessible with NVDA's text review commands. Therefore, it is necessary to scroll the console window to read earlier text. +In newer versions of the console and in Windows Terminal, it is possible to review the entire text buffer freely without the need to scroll the window. %kc:beginInclude -The following built-in Windows Console keyboard shortcuts may be useful when [reviewing text #ReviewingText] with NVDA: +The following built-in Windows Console keyboard shortcuts may be useful when [reviewing text #ReviewingText] with NVDA in older versions of Windows Console: || Name | Key | Description | | Scroll up | control+upArrow | Scrolls the console window up, so earlier text can be read. | | Scroll down | control+downArrow | Scrolls the console window down, so later text can be read. | @@ -1894,11 +1895,10 @@ 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: This option is currently equivalent to "legacy". -However, with this option selected, NVDA will begin using UI Automation in consoles automatically in a future version once it has become stable and suitable for wider use. -- UIA when available: Uses UI Automation in consoles if available. -This will include Console versions which have incomplete or buggy UI Automation implementations. -Though not yet fully stable, UI Automation may provide a superior user experience in some scenarios, especially in the Windows 11 Sun Valley 2 (22H2) update. +- Automatic: Uses UI Automation in the version of Windows Console included with Windows 11 version 22H2 and later. +This option is recommended and set by default. +- UIA when available: Uses UI Automation in consoles if available, even for 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. - Legacy: UI Automation in the Windows Console will be completely disabled. The legacy fallback will always be used even in situations where UI Automation would provide a superior user experience. Therefore, selecting this option is not recommended unless you know what you are doing. From c80f4212011df798c070256c6b8760541f924ef1 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Mon, 24 May 2021 03:50:11 -0400 Subject: [PATCH 2/3] Implement the runtime check for UIA console by default. --- source/UIAHandler/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/UIAHandler/utils.py b/source/UIAHandler/utils.py index e2676debb94..6798a3c57db 100644 --- a/source/UIAHandler/utils.py +++ b/source/UIAHandler/utils.py @@ -305,9 +305,7 @@ def _shouldUseUIAConsole(hwnd: int) -> bool: else: # #7497: the UIA implementation in old conhost is incomplete, therefore we # should ignore it. - # When the UIA implementation is improved, the below line will be replaced - # with a check that _getConhostAPILevel >= FORMATTED. - return False + return _getConhostAPILevel(hwnd) >= WinConsoleAPILevel.FORMATTED @lru_cache(maxsize=10) From 0ec7808f66cbbb6add483d31963c461547372559 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Tue, 21 Jun 2022 16:16:52 +1000 Subject: [PATCH 3/3] update changes --- user_docs/en/changes.t2t | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index fc739bc0fec..9cb720c1f76 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -6,6 +6,15 @@ What's New in NVDA = 2022.3 = == New Features == +- In the Windows Console Host used by Command Prompt, PowerShell, and the Windows Subsystem for Linux on Windows 11 version 22H2 (Sun Valley 2) and later: + - Vastly improved performance and stability. (#10964) + - When pressing ``ctrl+f`` to find text, the review cursor position is updated to follow the found term. (#11172) + - Reporting of typed text that does not appear onscreen (such as passwords) is disabled by default. +It can be re-enabled in NVDA's advanced settings panel. (#11554) + - Text that has scrolled offscreen can be reviewed without scrolling the console window. (#12669) + - More detailed text formatting information is available. (microsoft/terminal#10336) + - +- == Changes == @@ -19,6 +28,10 @@ What's New in NVDA == Changes for Developers == +- In builds of Windows Console (``conhost.exe``) with an NVDA API level of 2 (``FORMATTED``) or greater, such as those included with Windows 11 version 22H2 (Sun Valley 2), UI Automation is now used by default. (#10964) + - This can be overridden by changing the "Windows Console support" setting in NVDA's advanced settings panel. + - +- === Deprecations ===