Verified Commit f88831f2 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applet: add accessible description to details area

Let a screen reader read the details.
parent df784d36
......@@ -125,6 +125,19 @@ PlasmaExtras.ExpandableListItem {
Layout.preferredHeight: detailsGrid.implicitHeight
acceptedButtons: Qt.RightButton
activeFocusOnTab: repeater.count > 0
Accessible.description: {
let description = [];
for (let i = 0; i < currentDeviceDetails.length; i += 2) {
description.push(currentDeviceDetails[i]);
description.push(": ");
description.push(currentDeviceDetails[i + 1]);
description.push("; ");
}
return description.join('');
}
onPressed: {
const item = detailsGrid.childAt(mouse.x, mouse.y);
if (!item || !item.isContent) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment