From d2c28c7ee3f71fc2246d531b679fd0b5dc66dfc7 Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Thu, 29 Feb 2024 21:35:20 -0800 Subject: [PATCH] Fix bug with TalkBack not reading out SplitInstructionsView This CL sets an accessibility title so that TalkBack and other tools will properly read out the instructions on SplitInstructionsView. Fixes: 323461342 Flag: ACONFIG com.android.wm.shell.enable_split_contextual TRUNKFOOD Test: TalkBack announces the instructions immediately when the view appears, and is not interrupted. Change-Id: I1666f0c374d40b31d732d3cca529f03a7f2f7f28 --- quickstep/res/layout/split_instructions_view.xml | 3 +-- .../src/com/android/quickstep/views/SplitInstructionsView.java | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/quickstep/res/layout/split_instructions_view.xml b/quickstep/res/layout/split_instructions_view.xml index 0bbbfd5165..1115ff2b7c 100644 --- a/quickstep/res/layout/split_instructions_view.xml +++ b/quickstep/res/layout/split_instructions_view.xml @@ -24,8 +24,7 @@ android:paddingTop="@dimen/split_instructions_vertical_padding" android:paddingBottom="@dimen/split_instructions_vertical_padding" android:elevation="@dimen/split_instructions_elevation" - android:visibility="gone" - android:importantForAccessibility="yes"> + android:visibility="gone"> exitSplitSelection()); instructionTextView.setText(R.string.toast_contextual_split_select_app); } + + // Set accessibility title, will be announced by a11y tools. + instructionTextView.setAccessibilityPaneTitle(instructionTextView.getText()); } private void exitSplitSelection() {