Skip to content

UIA Automation Id/modern input facility: replace UIAElement.cachedAutomationId with UIAAutomationId #11483

@josephsl

Description

@josephsl

Hi,

This stems from #11445 and #11454 and may serve as a test bed for other modules:

Is your feature request related to a problem? Please describe.

As noted in #11445, if a UIA element is not ready by the time NVDA asks for its properties, COM error is thrown. This is noticeable for Automation Id property, hence the reason for #11445.

One of the most prolific users of Automation Id is modern input facility (emoji panel, clipboard history, and friends). The most prominent issue is inability to detect and handle state change event (see #11454 comment for details).

Describe the solution you'd like

Replace use of UIAElement.CachedAutomationId with UIAAutomationId getter introduced in #11445. As a start, apply this change to modern input facility. This then allows NVDA to deal with more events, potentially helping us discover more efficient ways to support modern input features, including detecting when emoji panel closes.

Describe alternatives you've considered

Leave it as is.

Additional context

There are other places such as File Explorer app module where Automation Id comes into play. Although it would be beneficial to switch to UIAAutomationId getter, it will take time and introduces possible regressions. Therefore this issue (and an accompanying PR) will serve as a way for us to test the viability of this maintenance step.

Thanks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions