aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-02 15:13:30 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-02 15:24:44 +0000
commitbe9adeeda631926716038b852bf7e4b33daa2dc2 (patch)
tree9c70eaa5cc7f236898432d51ab8fc5fcb5d75cbf
parentb02a9febe602662d30f5e9b4169b461bbf2cbc0c (diff)
Popups: use "Dialog" accessible role
LayeredPane is described as "an object that can contain layered children, e.g. in a stack". There is no plain "Popup" accessible role. The closest match is "Dialog". Change-Id: I3fca381a953231ff3339ce05e5a00c82f47ba6e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/quicktemplates2/qquickpopup.cpp2
-rw-r--r--tests/auto/accessibility/data/drawer.qml4
-rw-r--r--tests/auto/accessibility/tst_accessibility.cpp4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 21303ffe..2982fbd3 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -2356,7 +2356,7 @@ QFont QQuickPopup::defaultFont() const
#ifndef QT_NO_ACCESSIBILITY
QAccessible::Role QQuickPopup::accessibleRole() const
{
- return QAccessible::LayeredPane;
+ return QAccessible::Dialog;
}
void QQuickPopup::accessibilityActiveChanged(bool active)
diff --git a/tests/auto/accessibility/data/drawer.qml b/tests/auto/accessibility/data/drawer.qml
new file mode 100644
index 00000000..12652164
--- /dev/null
+++ b/tests/auto/accessibility/data/drawer.qml
@@ -0,0 +1,4 @@
+import QtQuick 2.5
+import QtQuick.Controls 2.0
+
+Drawer { }
diff --git a/tests/auto/accessibility/tst_accessibility.cpp b/tests/auto/accessibility/tst_accessibility.cpp
index 22aae1f2..e232d75a 100644
--- a/tests/auto/accessibility/tst_accessibility.cpp
+++ b/tests/auto/accessibility/tst_accessibility.cpp
@@ -69,6 +69,7 @@ void tst_accessibility::a11y_data()
QTest::newRow("CheckBox") << "checkbox" << 0x0000002C << "CheckBox"; //QAccessible::CheckBox
QTest::newRow("CheckDelegate") << "checkdelegate" << 0x0000002C << "CheckDelegate"; //QAccessible::CheckBox
QTest::newRow("ComboBox") << "combobox" << 0x0000002E << "ComboBox"; //QAccessible::ComboBox
+ QTest::newRow("Drawer") << "drawer" << 0x00000012 << ""; //QAccessible::Dialog
QTest::newRow("Frame") << "frame" << 0x00000013 << ""; //QAccessible::Border
QTest::newRow("GroupBox") << "groupbox" << 0x00000014 << "GroupBox"; //QAccessible::Grouping
QTest::newRow("ItemDelegate") << "itemdelegate" << 0x00000022 << "ItemDelegate"; //QAccessible::ListItem
@@ -78,7 +79,7 @@ void tst_accessibility::a11y_data()
QTest::newRow("Page") << "page" << 0x00000025 << "Page"; //QAccessible::PageTab
QTest::newRow("PageIndicator") << "pageindicator" << 0x00000027 << ""; //QAccessible::Indicator
QTest::newRow("Pane") << "pane" << 0x00000010 << ""; //QAccessible::Pane
- QTest::newRow("Popup") << "popup" << 0x00000080 << ""; //QAccessible::LayeredPane
+ QTest::newRow("Popup") << "popup" << 0x00000012 << ""; //QAccessible::Dialog
QTest::newRow("ProgressBar") << "progressbar" << 0x00000030 << ""; //QAccessible::ProgressBar
QTest::newRow("RadioButton") << "radiobutton" << 0x0000002D << "RadioButton"; //QAccessible::RadioButton
QTest::newRow("RangeSlider") << "rangeslider" << 0x00000033 << ""; //QAccessible::Slider
@@ -99,7 +100,6 @@ void tst_accessibility::a11y_data()
QTest::newRow("ToolTip") << "tooltip" << 0x0000000D << "ToolTip"; //QAccessible::ToolTip
QTest::newRow("Dial") << "dial" << 0x00000031 << ""; //QAccessible::Dial
- // Drawer
// Tumbler
QTest::newRow("DayOfWeekRow") << "dayofweekrow" << 0x0 << "DayOfWeekRow"; //QAccessible::NoRole