diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-04-24 08:42:12 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-05-14 00:32:38 +0200 |
commit | 0377ad2f831dc782ce34369de5669f836d64763a (patch) | |
tree | d8f98f8d94e44d685a7f68332046246d31e0468f /src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp | |
parent | 24986ccb7b2020cbb574700a31667e88ed243194 (diff) |
a11y uia: Forward new QAccessibleAnnouncementEvent to UIA
Bridge the newly added QAccessibleAnnouncementEvent to UIA
on Windows, by calling UiaRaiseNotificationEvent [1].
This makes the announcement from the example app attached
to QTBUG-75003 work when using the NVDA screen reader on Windows.
As described in commit d25d9f2c2673bc287590d9a83bd7ef1357d7021a,
implement the UiaRaiseNotificationEvent function for MingW
in qwindowsuiautomation as MingW doesn't provide that
itself yet (see the earlier MingW build failure without
that "kludge" in place: [2]).
[1] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcoreapi/nf-uiautomationcoreapi-uiaraisenotificationevent
[2] https://testresults.qt.io/logs/qt/qtbase/e56b201c7260ebb02ca2d030a71b9f11e40a08ac/WindowsWindows_11_23H2x86_64WindowsWindows_11_23H2x86_64Clangqtci-windows-11_23H2-x86_64-52-8f4da0Sccache_UseConfigure/a2e63edda6293b516dbe4a96615c7aa3530d3c4d/build_1714142084/log.txt.gz
Fixes: QTBUG-75003
Change-Id: Ia32d49276e0dd33cff5113b4169ee317869390e7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp')
-rw-r--r-- | src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp index 1abb412ccd..5892493281 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp @@ -127,6 +127,9 @@ void QWindowsUiaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event return; switch (event->type()) { + case QAccessible::Announcement: + QWindowsUiaMainProvider::raiseNotification(static_cast<QAccessibleAnnouncementEvent *>(event)); + break; case QAccessible::Focus: QWindowsUiaMainProvider::notifyFocusChange(event); break; |