summaryrefslogtreecommitdiff
path: root/kde-frameworks/kirigami/files/kirigami-5.113.0-drawer-actions-accessible.patch
blob: 1a7dd0b9880714126a49097a0aef6a3e928800a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 31f8fbc0d1c55e0d4af02be309aae5cef29055e7 Mon Sep 17 00:00:00 2001
From: Volker Krause <vkrause@kde.org>
Date: Mon, 14 Aug 2023 17:38:20 +0200
Subject: [PATCH] Make drawer actions accessible

They could previously not be triggered at all, and had no label in
the global drawer.
---
 src/controls/private/ContextDrawerActionItem.qml | 2 ++
 src/controls/private/GlobalDrawerActionItem.qml  | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/controls/private/ContextDrawerActionItem.qml b/src/controls/private/ContextDrawerActionItem.qml
index 430ff87e6..f5b2ca5c7 100644
--- a/src/controls/private/ContextDrawerActionItem.qml
+++ b/src/controls/private/ContextDrawerActionItem.qml
@@ -95,4 +95,6 @@ Kirigami.BasicListItem {
             console.warning("Don't know how to trigger the action")
         }
     }
+
+    Accessible.onPressAction: listItem.clicked()
 }
diff --git a/src/controls/private/GlobalDrawerActionItem.qml b/src/controls/private/GlobalDrawerActionItem.qml
index 07e63fa38..6d3c5fe35 100644
--- a/src/controls/private/GlobalDrawerActionItem.qml
+++ b/src/controls/private/GlobalDrawerActionItem.qml
@@ -177,4 +177,7 @@ Kirigami.AbstractListItem {
 
     Keys.onDownPressed: event => nextItemInFocusChain().focus = true
     Keys.onUpPressed: event => nextItemInFocusChain(false).focus = true
+
+    Accessible.onPressAction: listItem.clicked()
+    Accessible.name: modelData.text
 }
-- 
GitLab