summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioswindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-05 17:14:34 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-15 21:34:59 +0100
commit7a512d1267442e646bb7942291197b2b03f4d1cd (patch)
tree80ded0ccb2ac44520ee39d123ee9fdb49d6b4e24 /src/plugins/platforms/ios/qioswindow.mm
parentaf051f9be230f06eba587c25d56837fb48fcc9ee (diff)
iOS: Propagate focus changes to VoiceOver
Changing the focus object should update the VoiceOver focused element, the same way we do it on macOS. There's no NSAccessibilityFocusedUIElementChangedNotification on iOS, but we can pass the focused element as an argument when posting the UIAccessibilityLayoutChangedNotification. The class method on QMacAccessibilityElement to get an element for an QAccessible::Id was not used by any callers, and has been modified to resolve the container from the QAccessibleInterface, so that we don't need to plumb that all the way from the focus change event. Inspired-by: Jan Möller <jan.moeller@governikus.de> Fixes: QTBUG-114608 Pick-to: 6.7 6.6 6.5 Change-Id: I2e43ae649bc7e3a44c1e1200e8de66bf420b1949 Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.mm')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 347c7b9df1..a0ba6213b9 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -458,6 +458,11 @@ bool QIOSWindow::isForeignWindow() const
return ![m_view isKindOfClass:QUIView.class];
}
+UIView *QIOSWindow::view() const
+{
+ return m_view;
+}
+
QT_END_NAMESPACE
#include "moc_qioswindow.cpp"