A11Y: Send Scrolling Events when Flickable moves

Task-number: QTBUG-103513
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I6b67ff2611f37a6519420d875e7d9a70d0eb210a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
This commit is contained in:
Jens Trillmann 2022-06-27 16:29:09 +02:00
parent 27e6a72621
commit ac0d923de6
1 changed files with 12 additions and 0 deletions

View File

@ -2884,6 +2884,12 @@ void QQuickFlickable::movementStarting()
if (!wasMoving && (d->hData.moving || d->vData.moving)) {
emit movingChanged();
emit movementStarted();
#if QT_CONFIG(accessibility)
if (QAccessible::isActive()) {
QAccessibleEvent ev(this, QAccessible::ScrollingStart);
QAccessible::updateAccessibility(&ev);
}
#endif
}
}
@ -2928,6 +2934,12 @@ void QQuickFlickable::movementEnding(bool hMovementEnding, bool vMovementEnding)
if (wasMoving && !isMoving()) {
emit movingChanged();
emit movementEnded();
#if QT_CONFIG(accessibility)
if (QAccessible::isActive()) {
QAccessibleEvent ev(this, QAccessible::ScrollingEnd);
QAccessible::updateAccessibility(&ev);
}
#endif
}
if (hMovementEnding) {