Skip to content

Just after NVDA restarts, Word, Excel and Chrome use UIA no matter the option selected in advanced settings panel #13704

@CyrilleB79

Description

@CyrilleB79

Steps to reproduce:

  1. In advanced settings panel, set the "Use UI Automation to access Microsoft Word document controls" on "Only when necessary".
  2. Open a Word document
  3. Press NVDA+Q and restart NVDA
  4. Navigate in the document with arrows
  5. Press F1 to open the log and look at the properties of the current navigator object (specifically Python class mro)
  6. Close the log to turn back to the Word document and navigate in it with arrows.
  7. Press F1 to open the log and look at the properties of the current navigator object (specifically Python class mro)

Actual behavior:

At step 3, each time I press up/down arrow, "edit read only" is reported befeore each line. Also there are issues with table navigation. All these issues are the ones encountered with UIA in this version of Word that does not support it yet very well.

At step 4, the Word document properties indicate that it is classified as UIA:

Developer info for navigator object:
name: ''
role: Role.DOCUMENT
roleText: None
states: State.FOCUSABLE, State.FOCUSED
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.Dynamic_WinwordWordDocumentWordDocumentEditableTextWithAutoSelectDetectionUIAWindowNVDAObject object at 0x08C13EF0>
Python class mro: (<class 'NVDAObjects.Dynamic_WinwordWordDocumentWordDocumentEditableTextWithAutoSelectDetectionUIAWindowNVDAObject'>, <class 'appModules.winword.WinwordWordDocument'>, <class 'NVDAObjects.UIA.wordDocument.WordDocument'>, <class 'UIAHandler.browseMode.UIADocumentWithTableNavigation'>, <class 'documentBase.DocumentWithTableNavigation'>, <class 'NVDAObjects.UIA.wordDocument.WordDocumentNode'>, <class 'NVDAObjects.behaviors.EditableTextWithAutoSelectDetection'>, <class 'NVDAObjects.UIA.UIA'>, <class 'NVDAObjects.window.winword.WordDocument'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: ''
location: RectLTWH(left=0, top=152, width=1349, height=554)
value: None
appModule: <'winword' (appName 'winword', process ID 5396) at address 7d3fc10>
appModule.productName: 'Microsoft Office 2016'
appModule.productVersion: '16.0.5290.1000'
TextInfo: <class 'NVDAObjects.UIA.wordDocument.WordDocumentTextInfo'>
windowHandle: 789328
windowClassName: '_WwG'
windowControlID: 0
windowStyle: 1442840576
extendedWindowStyle: 16
windowThreadID: 16064
windowText: 'Document Microsoft Word'
displayText: ''
UIAElement: <POINTER(IUIAutomationElement) ptr=0x72f8e60 at 8c215d0>
UIA automationID: 
UIA frameworkID: Win32
UIA runtimeID: (42, 789328)
UIA providerDescription: [pid:4572,providerId:0xC0B50 Main:Nested [pid:5396,providerId:0xC0B50 Main(parent link):Unidentified Provider (unmanaged:wwlib.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:UIAutomationCore.dll)]
UIA className: _WwG
UIA patterns available: ScrollPattern, TextPattern, LegacyIAccessiblePattern

At step 5, navigation is normal, i.e. as when UIA is not activated.

At step 6, we can see that the Word document is not classified as UIA but as IAccessible:

Developer info for navigator object:
name: 'Document Microsoft Word'
role: Role.EDITABLETEXT
roleText: None
states: State.FOCUSABLE, State.MULTILINE, State.FOCUSED
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.Dynamic_WinwordWordDocumentWordDocumentIAccessibleWindowNVDAObject object at 0x090F6BB0>
Python class mro: (<class 'NVDAObjects.Dynamic_WinwordWordDocumentWordDocumentIAccessibleWindowNVDAObject'>, <class 'appModules.winword.WinwordWordDocument'>, <class 'NVDAObjects.IAccessible.winword.WordDocument'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.behaviors.EditableTextWithoutAutoSelectDetection'>, <class 'editableText.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.window.winword.WordDocument'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=0, top=152, width=1349, height=554)
value: None
appModule: <'winword' (appName 'winword', process ID 5396) at address 7d3fc10>
appModule.productName: 'Microsoft Office 2016'
appModule.productVersion: '16.0.5290.1000'
TextInfo: <class 'NVDAObjects.window.winword.WordDocumentTextInfo'>
windowHandle: 789328
windowClassName: '_WwG'
windowControlID: 0
windowStyle: 1442840576
extendedWindowStyle: 16
windowThreadID: 16064
windowText: 'Document Microsoft Word'
displayText: ''
IAccessibleObject: <POINTER(IAccessible) ptr=0x76a2850 at 8fd9210>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=789328, objectID=-4, childID=0
IAccessible accName: 'Document Microsoft Word'
IAccessible accRole: ROLE_SYSTEM_CLIENT
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048580)
IAccessible accDescription: None
IAccessible accValue: None

Expected behavior:

At step 3, we should not encounter UIA bugs.

At step 4, Word document should be classified as at step 6, i.e. IAccessible properties.

Note:

A restart is required. The issue does not happen when just starting NVDA with ctrl+alt+N since the focus does not land in the Word document in this case, but on the taskbar.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2022.1rc1

Windows version:

Windows 10 20H2 (x64) build 19042.1645

Name and version of other software in use when reproducing the issue:

Microsoft® Word 2016 (16.0.5290.1000) MSO (16.0.5278.1000) 32 bits

Other information about your system:

N/A

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Yes, issue was already present in 2021.3.x and probably also before.

If NVDA add-ons are disabled, is your problem still occurring?

Yes, tests made without add-ons.

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/UIA-ms-officeSpecific to UIA used in MS office applications.p4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions