Improve accessibility based on HAN university accessibility report
Unfortunately, most issues are in Kirigami and we can't fix them from our side. Namely, these things remain unfixed: - `Kirigami.PlaceholderMessage` are not read by screen readers - When navigating with the keyboard, pressing tab selects elements from right to left, which is weird - When navigating with the keyboard, the selected element is not highlighted - `Kirigami.Action` that don't have a `text` property don't use the `Accessible.name` property when using a screen reader.
This commit is contained in:
parent
6c777875ff
commit
799e00d252
6 changed files with 20 additions and 2 deletions
|
@ -20,7 +20,10 @@ Kirigami.ScrollablePage {
|
||||||
actions: [
|
actions: [
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
icon.name: "network-disconnect"
|
icon.name: "network-disconnect"
|
||||||
onTriggered: root.currentDevice.unpair()
|
onTriggered: {
|
||||||
|
root.currentDevice.unpair()
|
||||||
|
pageStack.pop(0)
|
||||||
|
}
|
||||||
text: i18nd("kdeconnect-app", "Unpair")
|
text: i18nd("kdeconnect-app", "Unpair")
|
||||||
visible: root.currentDevice && root.currentDevice.isPaired
|
visible: root.currentDevice && root.currentDevice.isPaired
|
||||||
},
|
},
|
||||||
|
@ -122,6 +125,8 @@ Kirigami.ScrollablePage {
|
||||||
]
|
]
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
|
// FIXME: not accessible. screen readers won't read this. Idem for the other PlaceholderMessages
|
||||||
|
// https://invent.kde.org/frameworks/kirigami/-/merge_requests/1482
|
||||||
text: i18nd("kdeconnect-app", "This device is not paired")
|
text: i18nd("kdeconnect-app", "This device is not paired")
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
visible: root.currentDevice && root.currentDevice.isReachable && !root.currentDevice.isPaired && !root.currentDevice.isPairRequestedByPeer && !root.currentDevice.isPairRequested
|
visible: root.currentDevice && root.currentDevice.isReachable && !root.currentDevice.isPaired && !root.currentDevice.isPairRequestedByPeer && !root.currentDevice.isPairRequested
|
||||||
|
@ -162,6 +167,8 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
|
// FIXME: not accessible. screen readers won't read this.
|
||||||
|
// https://invent.kde.org/frameworks/kirigami/-/merge_requests/1482
|
||||||
visible: root.currentDevice && !root.currentDevice.isReachable
|
visible: root.currentDevice && !root.currentDevice.isReachable
|
||||||
text: i18nd("kdeconnect-app", "This device is not reachable")
|
text: i18nd("kdeconnect-app", "This device is not reachable")
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
|
@ -104,7 +104,7 @@ Kirigami.ApplicationWindow {
|
||||||
enabled: status & DevicesModel.Reachable
|
enabled: status & DevicesModel.Reachable
|
||||||
checked: pageStack.currentItem && pageStack.currentItem.currentDevice == device
|
checked: pageStack.currentItem && pageStack.currentItem.currentDevice == device
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.pageStack.clear()
|
root.pageStack.pop(0)
|
||||||
root.pageStack.push(
|
root.pageStack.push(
|
||||||
Qt.resolvedUrl("DevicePage.qml"),
|
Qt.resolvedUrl("DevicePage.qml"),
|
||||||
{currentDevice: device}
|
{currentDevice: device}
|
||||||
|
|
|
@ -30,6 +30,8 @@ Kirigami.ScrollablePage {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
checked: model.isChecked
|
checked: model.isChecked
|
||||||
onToggled: model.isChecked = checked
|
onToggled: model.isChecked = checked
|
||||||
|
Accessible.name: model.name
|
||||||
|
Accessible.description: model.description
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
@ -57,6 +59,9 @@ Kirigami.ScrollablePage {
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
icon.name: "settings-configure"
|
icon.name: "settings-configure"
|
||||||
visible: configSource != ""
|
visible: configSource != ""
|
||||||
|
// FIXME: not accessible. screen readers won't read this and just say "push button".
|
||||||
|
// https://bugreports.qt.io/browse/QTBUG-123123
|
||||||
|
Accessible.name: i18nd("kdeconnect-app", "Configure plugin")
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (pageStack.lastItem.toString().startsWith("PluginInfoPage")) {
|
if (pageStack.lastItem.toString().startsWith("PluginInfoPage")) {
|
||||||
pageStack.lastItem.configFile = configSource;
|
pageStack.lastItem.configFile = configSource;
|
||||||
|
|
|
@ -62,6 +62,8 @@ Kirigami.Page
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
id: noPlayersText
|
id: noPlayersText
|
||||||
|
// FIXME: not accessible. screen readers won't read this.
|
||||||
|
// https://invent.kde.org/frameworks/kirigami/-/merge_requests/1482
|
||||||
text: i18nd("kdeconnect-app", "No players available")
|
text: i18nd("kdeconnect-app", "No players available")
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
visible: pluginInterface.playerList.length == 0
|
visible: pluginInterface.playerList.length == 0
|
||||||
|
|
|
@ -46,6 +46,8 @@ Kirigami.ScrollablePage
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
|
// FIXME: not accessible. screen readers won't read this.
|
||||||
|
// https://invent.kde.org/frameworks/kirigami/-/merge_requests/1482
|
||||||
visible: commandsList.count === 0
|
visible: commandsList.count === 0
|
||||||
text: i18nd("kdeconnect-app", "No commands defined")
|
text: i18nd("kdeconnect-app", "No commands defined")
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
|
@ -243,6 +243,8 @@ Kirigami.ScrollablePage
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
|
// FIXME: not accessible. screen readers won't read this.
|
||||||
|
// https://invent.kde.org/frameworks/kirigami/-/merge_requests/1482
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - (Kirigami.Units.largeSpacing * 4)
|
width: parent.width - (Kirigami.Units.largeSpacing * 4)
|
||||||
visible: deviceConnected && view.count == 0 && currentSearchText.length != 0
|
visible: deviceConnected && view.count == 0 && currentSearchText.length != 0
|
||||||
|
|
Loading…
Reference in a new issue