diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-30 14:13:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-31 17:12:58 +0200 |
commit | bb794270ec6cffb5f95bd7d18056b9e7bede7baa (patch) | |
tree | ec5c7813a1b6b5898694e5cfa8a819508faabd76 /tests | |
parent | 739ad76846bc3d49472aacad9ed056cda314e26f (diff) |
Accessibility: Fix select state usage
The selectable/selected states refer to items in a list and similar,
do not interpret them as text selection states.
Without this change NVDA for example announces text edits as selected
which makes no sense and which it doesn't do for native text items.
Change-Id: Ib1d109523bd4cc2b9b40ace8a8c3d7d3a7f9f25c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 9387574c68..d6b193a288 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -1659,6 +1659,11 @@ void tst_QAccessibility::textEditTest() QTest::qWaitForWindowShown(&edit); QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&edit); QCOMPARE(iface->text(QAccessible::Value), edit.toPlainText()); + QVERIFY(iface->state().focusable); + QVERIFY(!iface->state().selectable); + QVERIFY(!iface->state().selected); + QVERIFY(iface->state().selectableText); + QAccessibleTextInterface *textIface = iface->textInterface(); QVERIFY(textIface); @@ -1936,7 +1941,8 @@ void tst_QAccessibility::lineEditTest() QVERIFY(iface->state().sizeable); QVERIFY(iface->state().movable); QVERIFY(iface->state().focusable); - QVERIFY(iface->state().selectable); + QVERIFY(!iface->state().selectable); + QVERIFY(iface->state().selectableText); QVERIFY(!iface->state().hasPopup); QCOMPARE(bool(iface->state().focused), le->hasFocus()); @@ -1964,7 +1970,9 @@ void tst_QAccessibility::lineEditTest() QVERIFY(!(iface->state().sizeable)); QVERIFY(!(iface->state().movable)); QVERIFY(iface->state().focusable); - QVERIFY(iface->state().selectable); + QVERIFY(!iface->state().selectable); + QVERIFY(!iface->state().selected); + QVERIFY(iface->state().selectableText); QVERIFY(!iface->state().hasPopup); QCOMPARE(bool(iface->state().focused), le->hasFocus()); |