aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-02-21 16:02:58 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-02 17:14:44 +0000
commit750817d52b4104817c8a695846a875d37c01452c (patch)
tree6dd0fc97457f564bd3f9a434cea74e2d689426e6 /tests
parent699a6d046d54d7e46c5163c628125fff4acec4c2 (diff)
A11Y: make QQuickText focusable for A11Y
A QtQuick Text element is used to represent a separate block of text in a window. Normally, when TalkBack is enabled, the user expects to be able to navigate between separate blocks of text with regular A11Y gestures. However before this patch the Text elements were not focusable by default, so all the Text elements in the Window were read by the TalkBack successively, as if it was one element. This could be solved by explicitly adding Accessible.focusable: true to the properties of every Text element. This patch enables A11Y focus on Text elements by default. Fixes: QTBUG-77371 Change-Id: Icfcef6ee301b9218bb9ace97a05432c9fc2ffb0a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 9c5f772b5eb008cd0d00a0801b80a399fdc0e3c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
index 1383d89ed2..d48c7ed163 100644
--- a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
+++ b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp
@@ -387,6 +387,7 @@ void tst_QQuickAccessible::basicPropertiesTest()
QCOMPARE(item->indexOfChild(text2), 1);
QVERIFY(!text2->state().editable);
QVERIFY(text2->state().readOnly);
+ QVERIFY(text2->state().focusable);
QCOMPARE(iface->indexOfChild(text2), -1);
QCOMPARE(text2->indexOfChild(item), -1);