summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2014-09-12 13:58:17 +0200
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2014-10-08 17:12:38 +0200
commita9885cce1d569b6865e473efbf5dd5e4a605f169 (patch)
tree939ac2df5000bbbc01c26b8d3f4590405aad2163
parent778a1ea02b02971dea9d2f3bbc04db80704de325 (diff)
Represent title bar in a more structured way for a11y purposes.
The title bar will now have up to two accessibility children: 1. Back button (optional) 2. Title bar text (City + Country + "10 day forecast" combined) Change-Id: I9ad75461befbb23e0a66780b445a16cb474a7a96 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
-rw-r--r--qml/pages/BasicPage.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/qml/pages/BasicPage.qml b/qml/pages/BasicPage.qml
index 85b5a59..fde939f 100644
--- a/qml/pages/BasicPage.qml
+++ b/qml/pages/BasicPage.qml
@@ -133,6 +133,7 @@ Item {
font.weight: Font.Bold
Layout.maximumWidth: ApplicationInfo.applicationWidth - t3.implicitWidth - 2 * ApplicationInfo.hMargin - 5 * ApplicationInfo.ratio - 42 * ApplicationInfo.ratio
Layout.alignment: Qt.AlignBaseline
+ Accessible.ignored: true
}
TouchLabel {
text: "- " + title2
@@ -143,6 +144,7 @@ Item {
Layout.alignment: Qt.AlignBaseline
Layout.maximumWidth: freeSpace > implicitWidth ? freeSpace : 0
property real freeSpace: ApplicationInfo.applicationWidth - t1.width - t3.implicitWidth - 2 * ApplicationInfo.hMargin - 5 * ApplicationInfo.ratio - 42 * ApplicationInfo.ratio
+ Accessible.ignored: true
}
Item {
Layout.fillWidth: true
@@ -156,10 +158,20 @@ Item {
pixelSize: 22
letterSpacing: -0.15
Layout.alignment: Qt.AlignBaseline
+ Accessible.ignored: true
}
Separator {
Layout.fillWidth: false
Layout.preferredWidth: ApplicationInfo.hMargin
+ Item {
+ // This item exist solely for accessibility purposes.
+ x: -parent.x + t1.x
+ visible: true
+ width: titleRow.width - t1.x
+ height: parent.height
+ Accessible.role: Accessible.StaticText
+ Accessible.name: title1 + " " + title2 + " " + title3
+ }
}
}
Rectangle {