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

a11y: Missing NameChanged event when setting windowModified property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.9.0 FF
    • 6.9.0 FF
    • None
    • Debian testing, qtbase self-compiled from git dev as of commit ef72e969629b5652eb89d0e80143bd6f31a20b72
    • Linux/Wayland, Linux/X11
    • 7fbe80c8a (dev)

    Description

      If the window title contains a corresponding "[*]" placeholder, changing the QWidget::windowModified property  [1] results in the displayed window title to change on some platforms, including Linux.

      If no explicit accessible name for a window is set, Qt reports the window title as the accessible name of the window.

      However, when implicitly changing the window title by setting the windowModified property, no QAccessible::NameChanged is sent, so assistive technology is not notified of the change of the window title, and e.g. on Linux, the AT-SPI cache is not updated accordingly, resulting in the obsolete window title still being used.

      (This is a more specialized problem similar to the one previously in QTBUG-124192 that still occurs with the fix for that one in place.)

      Steps to reproduce:

      1) compile and run attached sample program main.cpp

      2) start Accerciser ( https://gitlab.gnome.org/GNOME/accerciser ) and expand the tree of the sample application

      3) press the button in the sample application that results in both, the button text and the window title getting updated

      4) check the accessible name shown in Accerciser for both, the button and the window

      Actual result:

      For the window, the accessible name shown in Accerciser is still "My window" even though the displayed window title has changed to "My window title *", i.e. includes the asterisk now to indicate that there was a change.

      Expected result:

      The new window title "My window title *" should be displayed as the accessible name for the window in Accerciser, just as the new button text "new button text" is shown as the new accessible name for the button.

      Further information:

      Using the IPython console in Accerciser, it can be seen that the AT-SPI cache still contains the obsolete accessible name for the window, but the correct value is returned after explicitly clearing the cache:

      In [1]: acc.name
      Out[1]: 'My window '
      In [2]: acc.clearCache()
      In [3]: acc.name
      Out[3]: 'My window *'

      This indicates that an object:property-change:accessible-name event is missing on the AT-SPI level to invalidate the obsolete cache entry.

      [1] https://doc.qt.io/qt-6/qwidget.html#windowModified-prop

      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
            michaelweghorn Michael Weghorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes