diff options
author | Kaloyan Chehlarski <[email protected]> | 2025-05-16 11:20:40 +0200 |
---|---|---|
committer | Kaloyan Chehlarski <[email protected]> | 2025-06-05 22:46:54 +0000 |
commit | 245e1dacc930f52e8d6f09178e3942c33e785b10 (patch) | |
tree | 847dc4c8e4068014a2a48c43f21c2cd2fb1895b9 /tests | |
parent | 80547b9d786ee4773cabe9c610a5ad60569cf61a (diff) |
QAccessible::Paragraph maps to a Text control on Windows, which
causes Narrator to completely ignore its child nodes. Since even a
simple <p>Content</p> generates two nodes, a nameless parent
kParagraph and a named child kStaticText, the result is that
Narrator will see a Text node with no name, and simply read "text".
This change maps the kParagraph role to QAccessible::Grouping, which
allows Narrator to see its child nodes and read their contents aloud.
Fixes: QTBUG-134055
Pick-to: 6.10 6.9 6.8
Change-Id: I96d4262bd4149f1dec50d47491263d0b022d4b83
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/accessibility/tst_accessibility.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/accessibility/tst_accessibility.cpp b/tests/auto/widgets/accessibility/tst_accessibility.cpp index 9e69e3139..8db7d3314 100644 --- a/tests/auto/widgets/accessibility/tst_accessibility.cpp +++ b/tests/auto/widgets/accessibility/tst_accessibility.cpp @@ -548,7 +548,7 @@ void tst_Accessibility::roles_data() QTest::newRow("ax::mojom::Role::kNavigation") << QString("<nav>a</nav>") << 0 << QAccessible::Section; QTest::newRow("ax::mojom::Role::kNote") << QString("<div role='note'>a</div>") << 0 << QAccessible::Note; //QTest::newRow("ax::mojom::Role::kPane"); // No mapping to ARIA role - QTest::newRow("ax::mojom::Role::kParagraph") << QString("<p>a</p>") << 0 << QAccessible::Paragraph; + QTest::newRow("ax::mojom::Role::kParagraph") << QString("<p>a</p>") << 0 << QAccessible::Grouping; // QTest::newRow("ax::mojom::Role::kPdfActionableHighlight"); // No mapping to ARIA role // QTest::newRow("ax::mojom::Role::kPdfRoot"); // No mapping to ARIA role QTest::newRow("ax::mojom::Role::kPluginObject") @@ -659,7 +659,7 @@ void tst_Accessibility::objectName() QAccessibleInterface *p = document->child(0); QVERIFY(p); QVERIFY(p->object()); - QCOMPARE(p->role(), QAccessible::Paragraph); + QCOMPARE(p->role(), QAccessible::Grouping); QCOMPARE(p->object()->objectName(), QStringLiteral("my_id")); } @@ -689,7 +689,7 @@ void tst_Accessibility::crossTreeParent() p = p->child(0); QVERIFY(p); QVERIFY(p->object()); - QCOMPARE(p->role(), QAccessible::Paragraph); + QCOMPARE(p->role(), QAccessible::Grouping); QCOMPARE(p->parent(), subdocument); QCOMPARE(p->parent()->parent()->parent()->parent(), view->child(0)); QCOMPARE(p->parent()->parent()->parent()->parent()->parent(), view); |