Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7.2
-
None
-
-
9a6c32bed (dev), 2bc064780 (6.8), f5f699128 (6.7)
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
- relates to
-
QTBUG-114608 Programmatically setting focus does not move VoiceOver
-
- Closed
-
-
QTBUG-126692 forceActiveFocus() moves the screen reader only once
-
- Reported
-
For Gerrit Dashboard: QTBUG-126622 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
570874,3 | iOS: Always insert created a11y elements to the cache | dev | qt/qtbase | Status: MERGED | +2 | 0 |
571167,2 | iOS: Always insert created a11y elements to the cache | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
573957,2 | iOS: Always insert created a11y elements to the cache | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |