From be7c328eae96d7867eed1107ecfbfa589fe5da81 Mon Sep 17 00:00:00 2001 From: Hartmnt Date: Wed, 30 Nov 2022 12:40:26 +0000 Subject: [PATCH] FIX(a11y): Add "filtered" to accessibleName for TreeView, if applicable Previously, there was no way to know for sure, if the currently selected user and channel tree was being filtered. (in a screen reader context) This commit switches the accessibleName depending on the channel filter state. --- src/mumble/MainWindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mumble/MainWindow.cpp b/src/mumble/MainWindow.cpp index 3646f3b47..62ae021ee 100644 --- a/src/mumble/MainWindow.cpp +++ b/src/mumble/MainWindow.cpp @@ -163,7 +163,6 @@ MainWindow::MainWindow(QWidget *p) createActions(); setupUi(this); setupGui(); - qtvUsers->setAccessibleName(tr("Channels and users")); qteLog->setAccessibleName(tr("Activity log")); qteChat->setAccessibleName(tr("Chat message")); connect(qmUser, SIGNAL(aboutToShow()), this, SLOT(qmUser_aboutToShow())); @@ -472,6 +471,7 @@ void MainWindow::setupGui() { qaAudioTTS->setChecked(Global::get().s.bTTS); #endif qaFilterToggle->setChecked(Global::get().s.bFilterActive); + on_qaFilterToggle_triggered(); qaHelpWhatsThis->setShortcuts(QKeySequence::WhatsThis); @@ -2653,6 +2653,11 @@ void MainWindow::on_qaAudioReset_triggered() { void MainWindow::on_qaFilterToggle_triggered() { Global::get().s.bFilterActive = qaFilterToggle->isChecked(); + if (!Global::get().s.bFilterActive) { + qtvUsers->setAccessibleName(tr("Channels and users")); + } else { + qtvUsers->setAccessibleName(tr("Filtered channels and users")); + } updateUserModel(); }