diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-10-31 12:44:48 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-11-03 18:47:38 +0100 |
commit | d300a0fe765259d490c3510c9e2a8bac58e0aa15 (patch) | |
tree | 1cf4baab51bc53302867e43975b3efe973e82be0 /tests/auto/other | |
parent | 83d5a6ee620dd0f1e3064522a498864774ccaede (diff) |
Revert "Accessibility: don't emit focus change when reason is window activation"
This reverts commit 79a11470f3c4c61951906223f97001a77ce36500, which
resulted in QTBUG-105735. The new behavior is worse and affects multiple
screen readers, while the old issue is isolated to Windows Narrator and
could be considered a narrator bug.
Task-number: QTBUG-105735
Pick-to: 6.2 6.4
Change-Id: Ic8be1dbd592a3fdf2c3219ec4c5524bc2c7f0f6a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r-- | tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index a7b9512661..6f23f613ec 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -4339,20 +4339,10 @@ void tst_QAccessibility::messageBoxTest() if (!boxPrivate->canBeNativeDialog()) { // platforms that use a native message box will not emit accessibility events box.show(); - QVERIFY(QTest::qWaitForWindowActive(&box)); QAccessibleEvent showEvent(&box, QAccessible::DialogStart); QVERIFY(QTestAccessibility::containsEvent(&showEvent)); - // on some platforms, like macOS, not all widgets get key board focus; we - // only care about a push button getting focus - if (QTest::qWaitFor([&box]{ return qobject_cast<QPushButton *>(box.focusWidget()); }, 1000)) { - // a widget that gets focus through window activation should not emit an accessibility - // notification - QAccessibleEvent focusEvent(box.focusWidget(), QAccessible::Focus); - QVERIFY(!QTestAccessibility::containsEvent(&focusEvent)); - } - box.hide(); QAccessibleEvent hideEvent(&box, QAccessible::DialogEnd); |