Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Introduce IUIAutomation5 interface and ability to announce notifications in Windows 10 Fall Creators Update and later #8045
Link to issue number:
Summary of the issue:
Introduce IUIAutomation5 interface and ability to announce notifications in Windows 10 Fall Creators Update an later
Description of how this pull request fixes the issue:
In Windows 10 Fall Creators Update and later, apps can inform screen readers to announce specific notification text. This is done via IUIAutomationNotificationEventHandler::HandleNotificationEvent, which is part of IUIAutomation5 interface. Since NVDA only uses IUIAutomation3, update UIA subsystem to use IUIAutomation5. Also, introduce ability to use more recent IUIAutomation interfaces on various Windows 10 releases (such as IUIAutomation4 in Anniversary Update/build 14393).
Testing done via Windows 10 App Essentials add-on: using recent versions of various app (such as Calculator, Microsoft Store and others) that uses this new event to announce texts.
Known issues with pull request:
None so far.
Change log entry:
New feature: In Windows 10 Fall Creators Update and later, NVDA can announce notifications from apps such as Calculator and Windows Store.
Hi, yes, but apps I came across so far raises one of these at runtime, or prefers the newer events. For example, I expected Microsoft Store app to fire either live region change or notification event in Creators Update (Version 1703), but it raised only notification event in that version. But I would imagine third-party apps may raise both events (perhaps due to oversight), but I guess preparing for that might be in order somehow. Thanks. From: Michael Curran [mailto:email@example.com] Sent: Tuesday, February 27, 2018 10:16 PM To: nvaccess/nvda <firstname.lastname@example.org> Cc: Joseph Lee <email@example.com>; Author <firstname.lastname@example.org> Subject: Re: [nvaccess/nvda] Introduce IUIAutomation5 interface and ability to announce notifications in Windows 10 Fall Creators Update and later (#8045) Do you know if this causes any double speaking where Microsoft may have fired both liveRegionChange and notification for the same thing? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#8045 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkPHs4jSUrVFkBixQQAr01tdROGpqks5tZO8EgaJpZM4SV6jq> .
@leonardder: the Win10 version is the one to be used from binary builds and eventually from source once we move to Python 3. The generic version is meant for add-ons and to show that NVDA still supports Windows 7 SP1. The reason for this design is to keep it compatible with what we have at the moment: falling back to IUIAutomation2 if newer versions are not available. As @michaelDCurran pointed out, this is meant to be used at startup (both for Core and add-ons).
As all IUIAutomationX interfaces inherit from the one before, there is no issue with compatibility. I.e. code written for windows 7 can interact with an IUIAutomation5 object just as it was an IUIAutomation2 object. At start-up, NVDA should simply QueryInterface from IUIAutomation5 down to IUIAutomation until one succeeds. Thus UIAHandler.handler.clientObject will always be the highest one the Operating System happens to support.
referenced this pull request
Feb 28, 2018
In the end, isinstance checking will be done. I don't think an "else" is necessary except if we need to break out of the loop with that method.
Additional testing done by running the launcher (based on source code commits) on a Windows 8.1 system, and things work as expected. Thanks.