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

a11y AT-SPI: ATSPI_COORD_TYPE_PARENT is not supported

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.5.0 Beta1
    • 6.5.0 FF
    • None
    • Debian testing with qtbase self-compiled as described above
    • Linux/X11
    • a32a3aa388 (qt/qtbase/dev) a32a3aa388 (qt/tqtc-qtbase/dev)

    Description

      commit https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/737c9853b681fb20fda79b32ed92cda96b381dd0 added a third coordinate type ATSPI_COORD_TYPE_PARENT to AT-SPI, which is used to specify coordinates relative to the direct parent widget. As of now, Qt does not support it and returns wrong coordinates when it is used.

      Sample steps to reproduce, with qtbase dev branch as of commit 38114b83250cc9b14069d41935fb8822475de45a plus these three pending changes to fix other issues with coordinate handling:

      Steps to reproduce:

      1. build and run the "tabdialog" example from qtbase:
        $ qtbase/examples/widgets/dialogs/tabdialog/tabdialog
        
      2. move the window to a position other than the top-left of the screen, so that screen coordinates are different from window-relative coordinates
      3. start Accerciser
      4. navigate to the "Path:" label of the dialog in Accerciser's accessibility treeview of the sample application
      5. query/print the screen, window-relative and parent-relative coordinates of the label (selected in the treeview in the previous step) by typing the following into Accerciser's IPython console (with results from my run):
        In [12]: acc.queryComponent().getPosition(pyatspi.component.XY_SCREEN)
        Out[12]: (2262, 359)
        In [12]: acc.queryComponent().getPosition(pyatspi.component.XY_WINDOW)
        Out[13]: (22, 94)
        In [13]: acc.queryComponent().getPosition(pyatspi.component.XY_PARENT)
        Out[14]: (22, 94)
        In [14]:
        
      6. Query screen coordinates of the parent by typing the following in Accerciser's IPython console:
        acc.get_parent().queryComponent().getPosition(pyatspi.component.XY_SCREEN)
        Out[15]: (2253, 302)
        

        (see also the screencast attached to QTBUG-105042 that demonstrates how to do this in Accerciser and does pretty much the same with slightly different input in the Accerciser IPython console)

      Actual result:

      The value returned for the parent-relative coordinates is incorrect and is the same as that for the window-relative coordinates.

      For the above example:

      The parent's screen coordinates are (2253, 302) (s. step 6). The widget's screen coordinates are (2262, 359). Therefore, the parent-relative screen coordinates should be (9, 57) (retrieved by subtracting the parent's screen coordinates from the widget's screen coordinates), but (22, 94) is reported instead (s. step 5).

      Expected result:

      When using ATSPI_COORD_TYPE_PARENT, coordinates relative to the parent should be reported. (9, 57) for the above example.

       

      Attachments

        For Gerrit Dashboard: QTBUG-105313
        # Subject Branch Project Status CR V

        Activity

          People

            michaelweghorn Michael Weghorn
            michaelweghorn Michael Weghorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes