Skip to content

Commit

Permalink
GUI/documentation changes for UIA console by default.
Browse files Browse the repository at this point in the history
It was requested in nvaccess#10964 (comment) that the ternary option be exposed separately to the change in default behaviour to ease revertability. This commit exposes the ternary option as requested and updates the user guide in preparation for PR nvaccess#10964.

Co-authored-by: Łukasz Golonka <lukasz.golonka@mailbox.org>
  • Loading branch information
codeofdusk and lukaszgo1 committed Jun 17, 2022
1 parent 424ada7 commit 50e3fd5
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 18 deletions.
2 changes: 1 addition & 1 deletion include/liblouis
Submodule liblouis updated 86 files
+0 −4 .github/workflows/check-format.yml
+0 −4 .github/workflows/check-table-license.yml
+22 −52 .github/workflows/emscripten.yml
+0 −4 .github/workflows/macro.yml
+45 −17 .github/workflows/main.yml
+0 −35 .github/workflows/metadata.yml
+0 −4 .github/workflows/mingw.yml
+0 −48 .github/workflows/sanitizer.yml
+1 −1 .github/workflows/scripts/emscripten-build.sh
+50 −66 ANNOUNCEMENT
+1 −1 AUTHORS
+0 −73 NEWS
+78 −58 README
+0 −0 README.md
+2 −2 configure.ac
+95 −0 contrib/liblouis.el
+2 −18 doc/liblouis.texi
+2 −3 extra/generate-display-names/display-names
+118 −219 liblouis/compileTranslationTable.c
+140 −6 liblouis/internal.h
+6 −0 liblouis/liblouis.h.in
+174 −135 liblouis/lou_backTranslateString.c
+7 −33 liblouis/lou_translateString.c
+10 −10 liblouis/metadata.c
+4 −1 tables/Makefile.am
+0 −1 tables/ar-ar-g1-core.uti
+3 −15 tables/de-g0-core.uti
+8 −31 tables/de-g1-core.cti
+188 −286 tables/de-g2-core.cti
+0 −60 tables/de-g2-detailed.ctb
+6 −12 tables/de-g2.ctb
+5 −4 tables/en-gb-comp8.ctb
+0 −1 tables/en-ueb-g1.ctb
+181 −366 tables/gurumuki.cti
+0 −1 tables/hr-translation.cti
+44 −504 tables/hu-backtranslate-word-corrections.cti
+3 −5 tables/hu-chardefs.cti
+2 −170 tables/hu-exceptionwords.cti
+5 −2 tables/hu-hu-g1.ctb
+4 −21 tables/hu-hu-g1_braille_input.cti
+9 −8 tables/hu-hu-g2.ctb
+47 −68 tables/hu-hu-g2_exceptions.cti
+0 −1 tables/lt-6dot.utb
+1 −1 tables/nl-NL-g0.utb
+0 −14 tables/no-no-g3.ctb
+17 −0 tables/no.tbl
+4 −19 tables/pu-in-g1.utb
+1 −1 tables/ru-litbrl-detailed.utb
+141 −147 tables/ru-litbrl.ctb
+328 −0 tables/sk-chardefs.cti
+15 −947 tables/sk-g1.ctb
+64 −0 tables/sk-translation.cti
+21 −0 tables/sk.tbl
+0 −1 tables/sl-si-g1.utb
+0 −1 tables/vi-puncsdef.uti
+0 −4 tests/Makefile.am
+0 −3 tests/braille-specs/Makefile.am
+11 −7 tests/braille-specs/de-g0.yaml
+15 −15 tests/braille-specs/de-g1.yaml
+0 −24 tests/braille-specs/de-g2-detailed-specs.yaml
+23 −13 tests/braille-specs/de-g2-sbs.yaml
+6 −53 tests/braille-specs/de-g2.yaml
+63 −63 tests/braille-specs/hu-hu-g1-numbers.yaml
+1 −4 tests/braille-specs/hu-hu-g1_backward.yaml
+21 −21 tests/braille-specs/hu-hu-g1_braille_input_forward.yaml
+0 −4 tests/braille-specs/hu-hu-g1_harness.yaml
+0 −84,080 tests/braille-specs/hu-hu-g1_special_consonants.yaml
+2 −2 tests/braille-specs/nl-g0_harness.yaml
+0 −2,708 tests/braille-specs/pa.yaml
+5 −7 tests/braille-specs/ru.yaml
+38 −119 tests/braille-specs/sk-g1_harness.yaml
+29 −2 tests/braille-specs/spaces.yaml
+1 −4 tests/emphclass.c
+0 −6 tests/findTable.c
+3 −8 tests/suggestChunks.c
+1 −1 tests/typeform.c
+0 −1 tests/yaml/Makefile.am
+0 −2 tests/yaml/capsword.yaml
+1 −0 tests/yaml/issue-615.yaml
+0 −33 tests/yaml/nonumsign.yaml
+8 −7 tests/yaml/numericmode.yaml
+1 −28 tools/brl_checks.c
+0 −3 tools/brl_checks.h
+28 −13 tools/lou_checkyaml.c
+0 −1 tools/lou_debug.c
+1 −1 windows/include/config.h
55 changes: 40 additions & 15 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2680,15 +2680,40 @@ def __init__(self, parent):
self.bindHelpEvent("UseUiaForExcel", self.UIAInMSExcelCheckBox)
self.UIAInMSExcelCheckBox.SetValue(config.conf["UIA"]["useInMSExcelWhenAvailable"])
self.UIAInMSExcelCheckBox.defaultValue = self._getDefaultValue(["UIA", "useInMSExcelWhenAvailable"])

# Translators: This is the label for a checkbox in the
# Advanced settings panel.
label = _("Use UI Automation to access the Windows C&onsole when available")
consoleUIADevMap = True if config.conf['UIA']['winConsoleImplementation'] == 'UIA' else False
self.ConsoleUIACheckBox = UIAGroup.addItem(wx.CheckBox(UIABox, label=label))
self.bindHelpEvent("AdvancedSettingsConsoleUIA", self.ConsoleUIACheckBox)
self.ConsoleUIACheckBox.SetValue(consoleUIADevMap)
self.ConsoleUIACheckBox.defaultValue = self._getDefaultValue(["UIA", "winConsoleImplementation"])
# Translators: This is the label for a combo box for selecting the
# active console implementation in the advanced settings panel.
# Choices are automatic, UIA when available, and legacy.
consoleComboText = _("Windows C&onsole support:")
consoleChoices = [
# 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)"),
# 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"),
# Translators: A choice in a combo box in the advanced settings
# panel to have NVDA use its legacy Windows Console support
# in all cases.
_("Legacy")
]
#: The possible console config values, in the order they appear
#: in the combo box.
self.consoleVals = (
"auto",
"UIA",
"legacy"
)
self.consoleCombo = UIAGroup.addLabeledControl(consoleComboText, wx.Choice, choices=consoleChoices)
self.bindHelpEvent("AdvancedSettingsConsoleUIA", self.consoleCombo)
curChoice = self.consoleVals.index(
config.conf['UIA']['winConsoleImplementation']
)
self.consoleCombo.SetSelection(curChoice)
self.consoleCombo.defaultValue = self.consoleVals.index(
self._getDefaultValue(["UIA", "winConsoleImplementation"])
)

label = pgettext(
"advanced.uiaWithChromium",
Expand Down Expand Up @@ -2980,7 +3005,7 @@ def haveConfigDefaultsBeenRestored(self):
)
and self.UIAInMSWordCombo.GetSelection() == self.UIAInMSWordCombo.defaultValue
and self.UIAInMSExcelCheckBox.IsChecked() == self.UIAInMSExcelCheckBox.defaultValue
and self.ConsoleUIACheckBox.IsChecked() == (self.ConsoleUIACheckBox.defaultValue == 'UIA')
and self.consoleCombo.GetSelection() == self.consoleCombo.defaultValue
and self.cancelExpiredFocusSpeechCombo.GetSelection() == self.cancelExpiredFocusSpeechCombo.defaultValue
and self.UIAInChromiumCombo.GetSelection() == self.UIAInChromiumCombo.defaultValue
and self.winConsoleSpeakPasswordsCheckBox.IsChecked() == self.winConsoleSpeakPasswordsCheckBox.defaultValue
Expand All @@ -3000,7 +3025,7 @@ def restoreToDefaults(self):
self.selectiveUIAEventRegistrationCheckBox.SetValue(self.selectiveUIAEventRegistrationCheckBox.defaultValue)
self.UIAInMSWordCombo.SetSelection(self.UIAInMSWordCombo.defaultValue)
self.UIAInMSExcelCheckBox.SetValue(self.UIAInMSExcelCheckBox.defaultValue)
self.ConsoleUIACheckBox.SetValue(self.ConsoleUIACheckBox.defaultValue == 'UIA')
self.consoleCombo.SetSelection(self.consoleCombo.defaultValue == 'auto')
self.UIAInChromiumCombo.SetSelection(self.UIAInChromiumCombo.defaultValue)
self.cancelExpiredFocusSpeechCombo.SetSelection(self.cancelExpiredFocusSpeechCombo.defaultValue)
self.winConsoleSpeakPasswordsCheckBox.SetValue(self.winConsoleSpeakPasswordsCheckBox.defaultValue)
Expand All @@ -3020,10 +3045,10 @@ def onSave(self):
config.conf["UIA"]["selectiveEventRegistration"] = self.selectiveUIAEventRegistrationCheckBox.IsChecked()
config.conf["UIA"]["allowInMSWord"] = self.UIAInMSWordCombo.GetSelection()
config.conf["UIA"]["useInMSExcelWhenAvailable"] = self.UIAInMSExcelCheckBox.IsChecked()
if self.ConsoleUIACheckBox.IsChecked():
config.conf['UIA']['winConsoleImplementation'] = "UIA"
else:
config.conf['UIA']['winConsoleImplementation'] = "auto"
consoleChoice = self.consoleCombo.GetSelection()
config.conf['UIA']['winConsoleImplementation'] = (
self.consoleVals[consoleChoice]
)
config.conf["featureFlag"]["cancelExpiredFocusSpeech"] = self.cancelExpiredFocusSpeechCombo.GetSelection()
config.conf["UIA"]["allowInChromium"] = self.UIAInChromiumCombo.GetSelection()
config.conf["terminals"]["speakPasswords"] = self.winConsoleSpeakPasswordsCheckBox.IsChecked()
Expand Down
12 changes: 10 additions & 2 deletions user_docs/en/userGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -1888,8 +1888,16 @@ This setting contains the following values:
- Always: where ever UI automation is available in Microsoft word (no matter how complete).
-

==== Use UI Automation to access the Windows Console when available ====[AdvancedSettingsConsoleUIA]
When this option is enabled, NVDA will use a new, work in progress version of its support for Windows Console which takes advantage of [accessibility improvements made by Microsoft https://devblogs.microsoft.com/commandline/whats-new-in-windows-console-in-windows-10-fall-creators-update/]. This feature is highly experimental and is still incomplete, so its use is not yet recommended. However, once completed, it is anticipated that this new support will become the default, improving NVDA's performance and stability in Windows command consoles.
==== Windows Console support ====[AdvancedSettingsConsoleUIA]
This option selects how NVDA interacts with the Windows Console used by command prompt, PowerShell, and the Windows Subsystem for Linux.
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, even for versions with incomplete or buggy 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.
- Legacy: UI Automation in the Windows Console will be completely disabled, so 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.
-

==== Use UIA with Microsoft Edge and other Chromium based browsers when available ====[ChromiumUIA]
Allows specifying when UIA will be used when it is available in Chromium based browsers such as Microsoft Edge.
Expand Down

0 comments on commit 50e3fd5

Please sign in to comment.