summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2013-04-17 10:13:26 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-17 18:42:15 +0200
commit4883749ae324cfc5b5d758323a9bdbbf4faf1401 (patch)
treef9ca1475df28f9cd80624d7d2376523de5492bc3
parent2ed163c6c6cb85b946b4166b3136d43336ff7adf (diff)
downloadqtquickcontrols-4883749ae324cfc5b5d758323a9bdbbf4faf1401.tar.gz
Make tab accessibility work.
The PageTab role is actually the button in the TabBar you click to change tabs - it's not the Tab item itself. PageTabs are treated as leaf items with no children by QML accessibility, which is obviously very wrong for Tab container items. There is currently no specific "TabContainer" role in Qt accessibility. Use LayeredPane as a replacement. Change-Id: I4728025aacd4b7c370c419533a25f58950f24b6c Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r--src/controls/Tab.qml2
-rw-r--r--src/controls/TabView.qml4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/controls/Tab.qml b/src/controls/Tab.qml
index dbcdc137..5f1eacfa 100644
--- a/src/controls/Tab.qml
+++ b/src/controls/Tab.qml
@@ -56,7 +56,7 @@ Loader {
/*! This property holds the title of the tab. */
property string title
- Accessible.role: Accessible.PageTab
+ Accessible.role: Accessible.LayeredPane
active: false
visible: false
diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml
index 82acef72..b5438bc4 100644
--- a/src/controls/TabView.qml
+++ b/src/controls/TabView.qml
@@ -188,7 +188,7 @@ FocusScope {
Component.onCompleted: {
for (var i = 0 ; i < stack.children.length ; ++i) {
- if (stack.children[i].Accessible.role === Accessible.PageTab)
+ if (stack.children[i].Accessible.role === Accessible.LayeredPane)
__tabs.push(stack.children[i])
}
__setOpacities()
@@ -210,7 +210,7 @@ FocusScope {
var tabAdded = false
for (var i = 0; i < children.length; ++i) {
var child = children[i]
- if (child.Accessible.role === Accessible.PageTab) {
+ if (child.Accessible.role === Accessible.LayeredPane) {
__tabs.push(child)
child.parent = stack
child.Component.onDestruction.connect(stack.onDynamicTabDestroyed.bind(child))