From fbeb143ea64aa5d4d62e5b55b0e7500b907aac39 Mon Sep 17 00:00:00 2001 From: Saumya Prakash Date: Fri, 26 May 2023 17:57:05 +0000 Subject: [PATCH] Match displayed instruction with voiceover text. When users are using TalkBack, the text being read aloud did not match the text displayed on the screen. This change fixes that in accordance to the accessibility testing principles by changing the text spoken aloud. Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL Fix: 274996517 Test: Manually went through both versions of the tutorial using talkback and without using it. Ensured the spoken text matched the displayed text Change-Id: I896f2c09bd220615722777c73935f70c946715b2 --- .../quickstep/interaction/TutorialController.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java index 084f8c1298..5ec92a6542 100644 --- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java @@ -412,10 +412,12 @@ abstract class TutorialController implements BackGestureAttemptCallback, } mFeedbackTitleView.setText(titleResId); - mFeedbackSubtitleView.setText(spokenSubtitleResId == NO_ID - ? mContext.getText(subtitleResId) - : Utilities.wrapForTts( - mContext.getText(subtitleResId), mContext.getString(spokenSubtitleResId))); + mFeedbackSubtitleView.setText( + ENABLE_NEW_GESTURE_NAV_TUTORIAL.get() || spokenSubtitleResId == NO_ID + ? mContext.getText(subtitleResId) + : Utilities.wrapForTts( + mContext.getText(subtitleResId), + mContext.getString(spokenSubtitleResId))); if (isGestureSuccessful) { if (mTutorialFragment.isAtFinalStep()) { showActionButton();