Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-110624

a11y: QMenu popup not in a11y registry

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15
    • None
    • Linux/X11

    Description

      When using a popup QMenu it doesn't get exposed in the accessible tree registry of at-spi. Unclear why.

       

      • use the tool `accerciser` to inspect Accessible entities of an application (it's a bit tricky to ensure the menu stays open while fiddling with accerciser, I've started the app on a nested wayland compositor so the menu doesn't lose focus when switching to accerciser)
      • no trace of QMenu in accerciser, *even when it is currently popped up*
      • it strangely appears to send `showing` state changes when monitoring events of the application, so I presume the Accessible is actually exported on the a11y bus, it just does not appear in the tree

       

      // SPDX-License-Identifier: BSD-2-Clause
      // SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
      
      #include <QApplication>
      #include <QMenu>
      #include <QPushButton>
      
      int main(int argc, char **argv)
      {
          QApplication app(argc, argv);
      
          auto w = new QWidget;
          auto b = new QPushButton(w);
      
          auto l = new QMenu(w);
          l->addAction(new QAction("hello"));
          QObject::connect(b, &QPushButton::clicked, l, [l] { l->show(); });
      
          w->show();
      
          return app.exec();
      }
      
      

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            apachelogger Harald Sitter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes