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

[iOS] Screen Reader focus gets stuck

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS
    • 9a6c32bed (dev)

    Description

      When moving the Screen Reader's focus programmatically by calling forceActiveFocus() to pre-select a reasonable component for the user, the a11y focus gets stuck on that element. It is not possible to move the Screen Reader afterwards. One needs to manually click on any other element on the screen to be able to move the focus again.

      In the attached MWE, the initial focus resides on the "First text" element. By clicking the button, the focus is programmatically moved to the "Second text". After doing so, the other elements are not reachable via the Screen Reader.

      I'm suspecting the change https://codereview.qt-project.org/c/qt/qtbase/+/520216 from QTBUG-114608 to be the culprit for this behavior. The change retrieves an a11y element from the cache by calling QMacAccessibilityElement elementWithId:event->uniqueId(). This ctor inserts any new items to the cache whereas QUIView::createAccessibleElement creates its own elements without adding them to the cache. It seems in the current situation, the iOS Screen Reader only "knows" about the new element that received the focus and was created from QIOSPlatformAccessibility::notifyAccessibilityUpdate.

       

      A second issue I encountered is that the MWE does work for the first button click where the focus is moved correctly. Clicking the button a second time does not move the focus.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              janmoeller Jan Möller
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change