-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
Make UIA in MS Word optional again, through an Advanced Settings category #9200
Changes from 2 commits
f60b7b0
7586d66
1eb1612
9978eec
238294c
171b998
4724d83
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1928,6 +1928,67 @@ def onSave(self): | |
lang = self.languageCodes[self.languageChoice.Selection] | ||
config.conf["uwpOcr"]["language"] = lang | ||
|
||
class AdvancedPanel(SettingsPanel): | ||
# Translators: This is the label for the Advanced settings panel. | ||
title = _("Advanced") | ||
|
||
def makeSettings(self, settingsSizer): | ||
sHelper = guiHelper.BoxSizerHelper(self, sizer=settingsSizer) | ||
|
||
# Translators: This is a label appearing on the Advanced settings panel. | ||
panelText =_("Warning! The following settings are for advanced users. Changing them may cause NVDA to function incorrectly. Please only change these if you know what you are doing or have been specifically instructed by NVDA developers.") | ||
sHelper.addItem(wx.StaticText(self, label=panelText)) | ||
|
||
# Translators: This is the label for a group of Advanced options in the | ||
# Advanced settings panel | ||
groupText = _("Microsoft UI Automation") | ||
UIAGroup = guiHelper.BoxSizerHelper(self, sizer=wx.StaticBoxSizer(wx.StaticBox(self, label=groupText), wx.VERTICAL)) | ||
sHelper.addItem(UIAGroup) | ||
|
||
# Translators: This is the label for a checkbox in the | ||
# Advanced settings panel. | ||
label = _("Use UI Automation to access Microsoft &Word document controls when available") | ||
self.UIAInMSWordCheckBox=UIAGroup.addItem(wx.CheckBox(self, label=label)) | ||
self.UIAInMSWordCheckBox.SetValue(config.conf["UIA"]["useInMSWordWhenAvailable"]) | ||
|
||
# Translators: This is the label for a group of Advanced options in the | ||
# Advanced settings panel | ||
groupText = _("Editable Text") | ||
editableTextGroup = guiHelper.BoxSizerHelper(self, sizer=wx.StaticBoxSizer(wx.StaticBox(self, label=groupText), wx.VERTICAL)) | ||
sHelper.addItem(editableTextGroup) | ||
|
||
# Translators: This is the label for a numeric control in the | ||
# Advanced settings panel. | ||
label = _("Caret movement timeout (in ms)") | ||
self.caretMoveTimeoutSpinControl=editableTextGroup.addLabeledControl(label,nvdaControls.SelectOnFocusSpinCtrl, | ||
min=0, max=2000, | ||
initial=config.conf["editableText"]["caretMoveTimeoutMs"] | ||
) | ||
|
||
# Translators: This is the label for a group of Advanced options in the | ||
# Advanced settings panel | ||
groupText = _("Debug logging categories") | ||
debugLogGroup = guiHelper.BoxSizerHelper(self, sizer=wx.StaticBoxSizer(wx.StaticBox(self, label=groupText), wx.VERTICAL)) | ||
sHelper.addItem(debugLogGroup) | ||
|
||
self.debugLogCheckboxes={} | ||
for key in ( | ||
"hwIo", | ||
"audioDucking", | ||
"gui", | ||
"louis", | ||
"timeSinceInput", | ||
): | ||
checkbox=debugLogGroup.addItem(wx.CheckBox(self, label=key)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you considered making this a checkable list? You can use the keyboard layouts list as an example. |
||
checkbox.SetValue(config.conf["debugLog"][key]) | ||
self.debugLogCheckboxes[key]=checkbox | ||
|
||
def onSave(self): | ||
config.conf["UIA"]["useInMSWordWhenAvailable"]=self.UIAInMSWordCheckBox.IsChecked() | ||
config.conf["editableText"]["caretMoveTimeoutMs"]=self.caretMoveTimeoutSpinControl.GetValue() | ||
for k,v in self.debugLogCheckboxes.iteritems(): | ||
config.conf['debugLog'][k]=v.IsChecked() | ||
|
||
class DictionaryEntryDialog(wx.Dialog): | ||
TYPE_LABELS = { | ||
# Translators: This is a label for an Entry Type radio button in add dictionary entry dialog. | ||
|
@@ -2481,6 +2542,8 @@ class NVDASettingsDialog(MultiCategorySettingsDialog): | |
categoryClasses.append(TouchInteractionPanel) | ||
if winVersion.isUwpOcrAvailable(): | ||
categoryClasses.append(UwpOcrPanel) | ||
# And finally the Advanced panel which should always be last. | ||
categoryClasses.append(AdvancedPanel) | ||
|
||
def makeSettings(self, settingsSizer): | ||
# Ensure that after the settings dialog is created the name is set correctly | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1603,6 +1603,26 @@ This category contains the following options: | |||||
==== Recognition language ====[Win10OcrSettingsRecognitionLanguage] | ||||||
This combo box allows you to choose the language to be used for text recognition. | ||||||
|
||||||
+++ Advanced Settings +++ | ||||||
Warning! The settings in this category are for advanced users and may cause NVDA to not function correctly if configured in the wrong way. | ||||||
Only make changes to these settings if you are sure you know what you are doing or if you have been specifically instrructed to by an NVDA developer. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instrructed = instructed |
||||||
|
||||||
==== Use UI automation to access Microsoft Word document controls when available ==== | ||||||
When this option is enabled, NVDA will try to use the Microsoft UI Automation accessibility api in order to fetch information from Microsoft Word document controls. | ||||||
this includes in Microsoft Word itself, and also the Microsoft Outlook message viewer and composer. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't start with a capital T
Suggested change
|
||||||
For the most recent versions of Microsoft Office 2016/365 running on windows 10, UI Automation support is complete enough to provide access to Microsoft Word documents almost on par with NvDA's existing Microsoft Word support, with the added advantage that responsiveness is majorly increased. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean with "on par"? I assume it's a typo? Also, note the lower case v in NvDA's There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @LeonarddeR "on par" is used in golf, and at least quite commonly in Australia, apparently comes from Latin to mean equal to. As a suggestion, the phrase "feature parity" might be preferable. |
||||||
However, There may be some information which is either not exposed, or exposed incorrectly in some versions of Microsoft Office, which means this UI automation support cannot always be relied upon. | ||||||
We still do not recommend that the majority of users turn this on by default, though we do welcome users of Office 2016/365 to test this feature and provide feedback. | ||||||
|
||||||
==== Caret move timeout (in MS) ==== | ||||||
This option allows you to configure the number of mili seconds NVDA will wait for the caret (insertion point) to move in editable text controls. | ||||||
If you find that NVDA seems to be incorrectly tracking the caret E.g. it seems to be always one character behind or is repeating lines, then you may wish to try increasing this value. | ||||||
|
||||||
==== Debug logging categories ==== | ||||||
The checkboxes in this group allow you to enable specific categories of debug messages in NVDA's log. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now a list instead of a group, though the list has its own group |
||||||
Logging these messages can resort in decreased performance and large log files. | ||||||
Only turn one of these on if specifically instructed to by an NVDA developer e.g. when debugging why a braille display driver is not functioning correctly. | ||||||
|
||||||
++ miscellaneous Settings ++[MiscSettings] | ||||||
Besides the [NVDA Settings #NVDASettings] dialog, The Preferences sub-menu of the NVDA Menu contains several other items which are outlined below. | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should leave in place checks that exclude versions that we know will not work. Though this should be reflected in the user guide; "This setting will not enable UIA in MS Word versions below 16.0.9000"