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
|
From 89cf0e629e0fcfd7508d24072a04567ca480e807 Mon Sep 17 00:00:00 2001
From: Christoph Wolk <cwo.kde@posteo.net>
Date: Sat, 8 Feb 2025 19:44:25 +0100
Subject: [PATCH] ModuleView: set AccessibleName for ScrollArea
The tab stop at the kcm scrollarea can in some cases serve a purpose,
but is very cryptic to screen reader users as it appears to be non-
interactable and is only announced with the confusing "LayeredPane".
Instead set an explicit AccessibleName that informs the user of the
general purpose of the control they are on. QAccessible does not support
the Atspi role SCROLL_PANE which would be optimal here, and there is no
clear equivalent, so it has to be done with AccessibleName.
---
app/ModuleView.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/ModuleView.cpp b/app/ModuleView.cpp
index b24f396fd..612f58272 100644
--- a/app/ModuleView.cpp
+++ b/app/ModuleView.cpp
@@ -272,6 +272,9 @@ void ModuleView::addModule(MenuItem *item, const QStringList &args)
auto page = new KPageWidgetItem(moduleScroll, data.name());
// Provide information to the users
+ // set accessible name, or screen reader users will have a cryptic "LayeredPane" tabstop
+ moduleScroll->setAccessibleName(i18ndc("systemsettings", "@other accessible name for view that can be scrolled", "Scrollable area"));
+
if (item->isExternalAppModule()) {
auto externalWidget = new ExternalAppModule(KService::Ptr(new KService(item->metaData().fileName())));
moduleScroll->setWidget(externalWidget);
--
GitLab
|