Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.1
-
None
-
-
f1eccab04e01b3acc1a4b4c6a5fe7b3af3e2dcba (qt/qtbase/dev) da7c44770f0ff0ca5f114b65efc61093226d96de (qt/qtbase/6.0) 7432281cc9647f7252eb579e1289220e79a66a1f (qt/qtbase/6.1) 97ee332ee6b95937c78b7cd4dbb5a03120e56f26 (qt/tqtc-qtbase/5.15)
Description
Repro steps:
- Using any version of Qt that supports UI Automation, create a dialog with a QListWidget
- Open a screen reader such as NVDA (https://github.com/nvaccess/nvda http://nvda.bhvd.de/ ) or Narrator
- Show the dialog
- Use Tab to focus the QListWidget
- Observe
Expected results:
- The screen reader reads the name of the QListWidget and the selected list item(s) (e.g. "Items list, Item 1, 1of 4, selected")
- The screen reader's focus indicator is shown around the selected list item
Actual results:
- The screen reader reads nothing (this is true of both NVDA and Narrator)
- The screen reader's focus indicator is shown around the previously focused widget, not the currently focused QListWidget
Additional info:
- I am upgrading an application from 5.9.3 (MSAA accessibility backend) to 5.15.1 (UIA accessibility backend). Both NVDA and Narrator behave as expected in 5.9.3.
Code sample:
#include <QApplication> #include <QListWidget> #include <QPushButton> #include <QVBoxLayout> int main(int argc, char *argv[]) { QApplication app(argc, argv); QCoreApplication::setApplicationName("Qt NVDA list widget bug"); QWidget window; window.resize({ 300, 100 }); window.setLayout(new QVBoxLayout()); QListWidget* list = new QListWidget(); list->setAccessibleName("Items"); window.layout()->addWidget(list); for (int i = 1; i < 5; ++i) { const QString name = QString("Item %1").arg(i); list->addItem(new QListWidgetItem(name)); } list->item(0)->setSelected(true); QPushButton *button = new QPushButton("OK"); window.layout()->addWidget(button); window.show(); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-90897 Windows/Accessibility: Qt does not report correct focused widget to screen readers on Windows
- Reported