Android: Exclude the QtWindow itself from Accessibilty
Since the QtWindow and its QtEditText are focusable only to hand over events to other components, the QtWindow itself should not be focusable by TalkBack, since this leads to an unnecessary nameless A11y-Element in the A11y tree. Task-number: QTBUG-126672 Change-Id: I532b9d3e252fbe01da7c953446242b045c57eebe Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 46cb9027f1ed6c61faec5364b5537ae7ab9e57c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>bb10
parent
571a4a3efb
commit
b2706531e9
|
|
@ -33,6 +33,7 @@ class QtWindow extends QtLayout implements QtSurfaceInterface {
|
|||
setParent(parentWindow);
|
||||
setFocusableInTouchMode(true);
|
||||
setDefaultFocusHighlightEnabled(false);
|
||||
setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
// Views are by default visible, but QWindows are not.
|
||||
// We should ideally pick up the actual QWindow state here,
|
||||
|
|
@ -45,6 +46,7 @@ class QtWindow extends QtLayout implements QtSurfaceInterface {
|
|||
m_editText = new QtEditText(context, listener);
|
||||
addView(m_editText, new QtLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
m_editText.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
} else {
|
||||
m_editText = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue