Skip to content

Commit bb97817

Browse files
authored
Fix screen reader accessibility in torrent list
PR #23359. Closes #20393.
1 parent d41012a commit bb97817

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/gui/transferlistwidget.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,9 +1306,16 @@ void TransferListWidget::displayListMenu()
13061306
listMenu->popup(QCursor::pos());
13071307
}
13081308

1309-
void TransferListWidget::currentChanged(const QModelIndex &current, const QModelIndex&)
1309+
void TransferListWidget::currentChanged(const QModelIndex &current, const QModelIndex &previous)
13101310
{
13111311
qDebug("CURRENT CHANGED");
1312+
1313+
// Call base class to ensure Qt's accessibility system is notified of focus changes.
1314+
// This is critical for screen readers to announce the currently selected torrent.
1315+
// Without this call, users relying on assistive technologies cannot effectively
1316+
// navigate the torrent list with keyboard arrow keys.
1317+
QTreeView::currentChanged(current, previous);
1318+
13121319
BitTorrent::Torrent *torrent = nullptr;
13131320
if (current.isValid())
13141321
{

src/gui/transferlistwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private slots:
111111
void torrentDoubleClicked();
112112
void displayListMenu();
113113
void displayColumnHeaderMenu();
114-
void currentChanged(const QModelIndex &current, const QModelIndex&) override;
114+
void currentChanged(const QModelIndex &current, const QModelIndex &previous) override;
115115
void setSelectedTorrentsSuperSeeding(bool enabled) const;
116116
void setSelectedTorrentsSequentialDownload(bool enabled) const;
117117
void setSelectedFirstLastPiecePrio(bool enabled) const;

0 commit comments

Comments
 (0)