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

a11y AT-SPI: Method "ScrollSubstringTo" from AT-SPI text interface not supported

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.5.0 Beta1
    • 6.5
    • None
    • qtbase self-compiled from the dev branch as of commit 0131dbd2f95449c09758208d8b190c9238a5c46a,
      LibreOffice master as of commit 1df81daa83a213086e4ca928834ae093a0f16f48, self-compiled with the qt6 VCL plugin enabled (--enable-qt6 autogen option)
    • Linux/X11
    • 45121669f5 (qt/qtbase/dev) 45121669f5 (qt/tqtc-qtbase/dev)

    Description

      Since commit https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/11c1a655ab4a9670dfc8ace9b5a9d6b722054980, the AT-SPI text interface has a method called "ScrollSubstringTo" that can be used to scroll the view so that the specified text portion becomes visible on screen.

      Doc: https://lazka.github.io/pgi-docs/Atspi-2.0/classes/Text.html#Atspi.Text.scroll_substring_to

      However, Qt currently doesn't support it.

      Sample steps to reproduce with the Qt 6 based UI variant of LibreOffice:

      1) open attached document "lorem2.odt" in the Qt 6 based variant of LibreOffice Writer

      2) run the attached pyatspi script "pyatspi-script-scrolltosubstring.py" that calls the "ScrollSubstringTo" method on the paragraph's a11y object to scroll to the end of the paragraph:

      $ python3 pyatspi-script-scrolltosubstring.py 

      Actual result:

      The script prints an error message:

      Traceback (most recent call last):
        File "/home/michi/git/computer-doc/TODO/misc/pyatspi-script-scrolltosubstring.py", line 39, in <module>
          text_iface.scrollSubstringTo(text_iface.get_characterCount() - 5, text_iface.get_characterCount(), pyatspi.component.SCROLL_ANYWHERE)
        File "/usr/lib/python3/dist-packages/pyatspi/text.py", line 599, in scrollSubstringTo
          return Atspi.Text.scroll_substring_to(self.obj, startOffset, endOffset, scroll_type)
      gi.repository.GLib.GError: atspi_error: No such object path '/org/a11y/atspi/accessible/2147484542' (1)
      

      The LibreOffice view remains unchanged.

      Expected result:

      The view should be scrolled so that the end of the paragraph becomes visible.

      Attachments

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

        Activity

          People

            smd Jan Arve
            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