[plasma/plasma-mobile] containments/homescreens/folio/qml/delegate: folio: Expose the homescreen delegates to accessibility

Jorijn van der Graaf <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit d5594f915c2d4044bd2006dba04473fd0fa1c800 by Jorijn van der Graaf.
Committed on 30/07/2026 at 18:18.
Pushed by devinlin into branch 'master'.

folio: Expose the homescreen delegates to accessibility

FavouritesBar sets name to "" when the "show favourites app labels"
setting is off, which is the default, and name is what produces the only
accessible node for a delegate - so in the default configuration a screen
reader cannot tell the favourites apart.

Separate the accessible name from the visual label with accessibleName,
defaulting to name, and expose the delegate itself. That also gives
assistive technology the delegate's whole rect rather than just the label
strip below the icon.

M  +7    -0    containments/homescreens/folio/qml/delegate/AbstractDelegate.qml
M  +5    -1    containments/homescreens/folio/qml/delegate/AppDelegate.qml
M  +1    -0    containments/homescreens/folio/qml/delegate/AppFolderDelegate.qml

https://invent.kde.org/plasma/plasma-mobile/-/commit/d5594f915c2d4044bd2006dba04473fd0fa1c800

diff --git a/containments/homescreens/folio/qml/delegate/AbstractDelegate.qml b/containments/homescreens/folio/qml/delegate/AbstractDelegate.qml
index fdf0e23b7..89ace21ae 100644
--- a/containments/homescreens/folio/qml/delegate/AbstractDelegate.qml
+++ b/containments/homescreens/folio/qml/delegate/AbstractDelegate.qml
@@ -24,6 +24,9 @@ Folio.DelegateTouchArea {
     property MobileShell.MaskManager maskManager
 
     property string name
+
+    property string accessibleName: name
+
     property bool shadow: false
 
     property alias contentItem: visualItem.contentItem
@@ -32,6 +35,10 @@ Folio.DelegateTouchArea {
 
     signal afterClickAnimation()
 
+    Accessible.role: Accessible.Button
+    Accessible.name: root.accessibleName
+    Accessible.onPressAction: root.afterClickAnimation()
+
     // grow/shrink animation
     property real scaleAmount: 1
     property bool clickRequested: false
diff --git a/containments/homescreens/folio/qml/delegate/AppDelegate.qml b/containments/homescreens/folio/qml/delegate/AppDelegate.qml
index 45232a36e..008865924 100644
--- a/containments/homescreens/folio/qml/delegate/AppDelegate.qml
+++ b/containments/homescreens/folio/qml/delegate/AppDelegate.qml
@@ -17,7 +17,11 @@ AbstractDelegate {
     id: root
 
     shadow: true
-    name: application ? application.name : ""
+
+    readonly property string applicationName: application ? application.name : ""
+
+    name: applicationName
+    accessibleName: applicationName
 
     // This may be null for short periods of time due to model changes
     property Folio.FolioApplication application
diff --git a/containments/homescreens/folio/qml/delegate/AppFolderDelegate.qml b/containments/homescreens/folio/qml/delegate/AppFolderDelegate.qml
index a1228c6b2..22eaf539d 100644
--- a/containments/homescreens/folio/qml/delegate/AppFolderDelegate.qml
+++ b/containments/homescreens/folio/qml/delegate/AppFolderDelegate.qml
@@ -11,6 +11,7 @@ import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
 AbstractDelegate {
     id: root
     name: folder.name
+    accessibleName: folder.name
     shadow: true
 
     property Folio.FolioApplicationFolder folder
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.