From 31f8fbc0d1c55e0d4af02be309aae5cef29055e7 Mon Sep 17 00:00:00 2001 From: Volker Krause 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