Android A11Y: fix content update notification when object is hidden

When the object is hidden, we should not use its viewId to notify
content changed. Instead, we need to use its parent id.

Task-number: QTBUG-95764
Pick-to: 6.3 6.2 5.15
Change-Id: I608658e21c401d76459a09e4b274c60b849ace86
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Ivan Solovev 2022-01-21 16:49:05 +01:00
parent f6ddb3e921
commit 850a7f1238

View File

@ -208,7 +208,10 @@ public class QtAccessibilityDelegate extends View.AccessibilityDelegate
sendEventForVirtualViewId(viewId,
AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED);
}
invalidateVirtualViewId(viewId);
// When the object is hidden, we need to notify its parent about
// content change, not the hidden object itself
final int parentId = QtNativeAccessibility.parentId(viewId);
invalidateVirtualViewId(parentId);
}
public void notifyObjectFocus(int viewId)