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

Accessibility id gets lost when QML item y position changed

    XMLWordPrintable

Details

    • Android

    Description

      Application is being auto tested using Appium and QML Accessibility metadata, specifically by using Accessible.name attached properties in QML items.

      Application settings has a menu structure where there are multiple levels of sub menus. A sub menu is always opened on top of other sub menus thus covering the other submenus. Y position of the opened sub menu is shifted up to utilize the area also from above the selection. This somehow confuses Accessibility framework on Android and accessibility ids get lost, i.e. some ids are not available anymore.

      I was able to create a sample app which reproduces the issue. In the attached video (disappeared_accessibility_id_when_y_changes.mov), you can see a column of two items. Initially, accessibility id of the first item is inspected and it is "box_1". When the second item (submenu) is clicked its content expands on top of the first item (box). Now, when accessibility id of the first item of the submenu content is inspected it still shows its accessibility id to be "box_1" even it is "submenu_2_content_1". So accessibility id of the below item is given.

      When inspecting the issue with Appium inspector it can be seen that there is no such accessibility id as "submenu_2_content_1" in the hierarchy (sample_with_y.xml). Therefore, the id in that screen position is the below item's id.

      However, if I remove binding "y: -subMenu.y" from the column then that accessibility id is found from the hierarchy (sample_without_y.xml).

       

      Initially, I thought that this might be related to child moving outside its parent's bounding box (visual area of the SubMenu element). However, if I make first item (Box) invisible when it leaves behind expanded SubMenu then things are working fine. Now "submenu_2_content_1" is visible in the hierarchy.

      Column {
          Box {
              visible: !subMenu.contentVisible
          }
          SubMenu {
              id: subMenu
          }
      }
      

       

      This issue has been tested on macOS, iOS and Android. It is only reproducible on Android.

       

      Attachments

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

        Activity

          People

            qtandroidteam Qt Android Team
            tealamak Tero Alamäki
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes