Skip to content

Commit 2aec36e

Browse files
Merge 2674ae6 into a452470
2 parents a452470 + 2674ae6 commit 2aec36e

4 files changed

Lines changed: 16 additions & 12 deletions

File tree

source/_UIAHandler.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -748,19 +748,22 @@ def _isUIAWindowHelper(self,hwnd):
748748
if res:
749749
# The window does support UIA natively, but MS Word documents now
750750
# have a fairly usable UI Automation implementation.
751-
# However, builds of MS Office 2016 before build 9000 or so had bugs which
751+
# However, builds of MS Office 2016 before build 13901 or so had bugs which
752752
# we cannot work around.
753-
# And even current builds of Office 2016 are still missing enough info from
754-
# UIA that it is still impossible to switch to UIA completely.
755-
# Therefore, if we can inject in-process, refuse to use UIA and instead
753+
# Therefore for less recent versions of Office,
754+
# if we can inject in-process, refuse to use UIA and instead
756755
# fall back to the MS Word object model.
757756
canUseOlderInProcessApproach = bool(appModule.helperLocalBindingHandle)
757+
isOfficeApp = appModule.productName.startswith(("Microsoft Office", "Microsoft Outlook"))
758758
if (
759+
# An MS Office app before build 13901
760+
isOfficeApp
761+
and int(appModule.productVersion.split('.')[2]) < 13901
759762
# An MS Word document window
760-
windowClass=="_WwG"
763+
and windowClass=="_WwG"
761764
# Disabling is only useful if we can inject in-process (and use our older code)
762765
and canUseOlderInProcessApproach
763-
# Allow the user to explicitly force UIA support for MS Word documents
766+
# Allow the user to explicitly force UIA support on or off for MS Word documents
764767
# no matter the Office version
765768
and not config.conf['UIA']['useInMSWordWhenAvailable']
766769
):

source/gui/settingsDialogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2593,7 +2593,7 @@ def __init__(self, parent):
25932593

25942594
# Translators: This is the label for a checkbox in the
25952595
# Advanced settings panel.
2596-
label = _("Use UI Automation to access Microsoft &Word document controls when available")
2596+
label = _("Always use UI Automation to access Microsoft &Word document controls when available")
25972597
self.UIAInMSWordCheckBox = UIAGroup.addItem(wx.CheckBox(UIABox, label=label))
25982598
self.bindHelpEvent("AdvancedSettingsUseUiaForWord", self.UIAInMSWordCheckBox)
25992599
self.UIAInMSWordCheckBox.SetValue(config.conf["UIA"]["useInMSWordWhenAvailable"])

user_docs/en/changes.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ What's New in NVDA
1818
- Espeak-ng has been updated to 1.51-dev commit ``74068b91bcd578bd7030a7a6cde2085114b79b44``. (#12665)
1919
- NVDA will default to eSpeak if no installed OneCore voices support the NVDA preferred language. (#10451)
2020
- If OneCore voices consistently fail to speak, revert to eSpeak as a synthesizer. (#11544)
21+
- For builds of Microsoft Office 2016/365 greater than 13900, NVDA will now always use UI Automation to access Microsoft Word document controls, no matter whether the user has toggled the `Use UI Automation to access Microsoft word document controls` advanced setting on or off.
2122
-
2223

2324

user_docs/en/userGuide.t2t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,12 +1834,12 @@ This has a major negative impact on performance, especially in applications like
18341834
Therefore, when this option is enabled, NVDA will limit event registration to the system focus for most events.
18351835
If you suffer from performance issues in one or more applications, We recommend you to try this functionality to see whether performance improves.
18361836

1837-
==== Use UI automation to access Microsoft Word document controls when available ====[AdvancedSettingsUseUiaForWord]
1838-
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.
1837+
==== Always use UI automation to access Microsoft Word document controls when available ====[AdvancedSettingsUseUiaForWord]
1838+
When this option is enabled, NVDA will always try to use the Microsoft UI Automation accessibility API in order to fetch information from Microsoft Word document controls, even for less recent builds of Microsoft Office 2016/365.
18391839
This includes Microsoft Word itself, and also the Microsoft Outlook message viewer and composer.
1840-
For the most recent versions of Microsoft Office 2016/365 running on Windows 10 and later, UI Automation support is complete enough to provide access to Microsoft Word documents almost equal to NVDA's existing Microsoft Word support, with the added advantage that responsiveness is majorly increased.
1841-
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.
1842-
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.
1840+
For Microsoft Office with a build version of 16.0.13901 or greater, NVDA will always use UI Automation to access Microsoft Word documents no matter how this setting is configured.
1841+
For the most recent versions of Microsoft Office 2016/365 running on Windows 10 and later, UI Automation support is complete enough to provide access to Microsoft Word documents almost equal to NVDA's existing Microsoft Word support, with the added advantage that responsiveness is majorly increased.
1842+
However, There may be some information which is either not exposed, or exposed incorrectly in some older builds of Microsoft Office, which means this UI automation support cannot always be relied upon.
18431843

18441844
==== Use UI Automation to access the Windows Console when available ====[AdvancedSettingsConsoleUIA]
18451845
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.

0 commit comments

Comments
 (0)