diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-04-10 09:43:41 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-05-14 00:32:38 +0200 |
commit | 7dd7ed141dcdde037b129398e0c1559d36e855cc (patch) | |
tree | b26d49ab15cb0b9951808a25774182c7d77e02c2 /src/widgets/widgets/qdatetimeedit.h | |
parent | 0377ad2f831dc782ce34369de5669f836d64763a (diff) |
a11y macOS: Forward new QAccessibleAnnouncementEvent on macOS
Bridge the newly added QAccessibleAnnouncementEvent on macOS
by calling NSAccessibilityPostNotificationWithUserInfo with
param NSAccessibilityAnnouncementRequestedNotification [1] and
a dict containing the message and priority as data.
Post the notification on the application element, as the
comment for NSAccessibilityAnnouncementRequestedNotification
in the NSAccessibilityConstants.h header says:
"This notification allows an application to request that an announcement be made
to the user by an assistive application such as VoiceOver. The notification
requires a user info dictionary with the key NSAccessibilityAnnouncementKey and
the announcement as a localized string. In addition, the key
NSAccessibilityAnnouncementPriorityKey should also be used to help an assistive
application determine the importance of this announcement. This notification
should be posted for the application element."
This makes the announcement from the example app attached
to QTBUG-75003 work when using the VoiceOver screen reader
on macOS.
[1] https://developer.apple.com/documentation/appkit/nsaccessibilityannouncementrequestednotification
Task-number: QTBUG-75003
Change-Id: Iabd9acf8267b0fef00706004f17d48ebc3ecc161
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets/qdatetimeedit.h')
0 files changed, 0 insertions, 0 deletions