aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFushan Wen <qydwhotmail@gmail.com>2022-11-05 01:44:30 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-11-11 19:12:19 +0000
commit1a6a7b312123b6c407a5594b0a1df12248557296 (patch)
tree3777e57291f8d09dbc81cfc7e0d6527cda343519 /src
parent173624e486e7fd6a00567a3802b05561c0d7e389 (diff)
Send ObjectShow event for visible components after initialized
Currently ObjectShow event is only sent when the visible property changes from false to true, but for items with the notification accessible role, a screen reader like Orca needs to receive an ObjectShow event to read the notification, so also send the event after a component is initialized. See also: https://gitlab.gnome.org/GNOME/orca/-/merge_requests/134 Change-Id: I626594b65ffe4d0582dcee9f489df0c2c63e53b7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 9a4f2d23ecec2c7ff19f83cff28df6b97e3fda98) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickitem.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 38b6838124..7a90b62e81 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -5230,6 +5230,13 @@ void QQuickItem::componentComplete()
d->addToDirtyList();
QQuickWindowPrivate::get(d->window)->dirtyItem(this);
}
+
+#if QT_CONFIG(accessibility)
+ if (d->isAccessible && d->effectiveVisible) {
+ QAccessibleEvent ev(this, QAccessible::ObjectShow);
+ QAccessible::updateAccessibility(&ev);
+ }
+#endif
}
QQuickStateGroup *QQuickItemPrivate::_states()