From ddf0b51d16f05ff699eb4880c8b97f62443d52c2 Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Thu, 5 Sep 2019 16:23:49 +0800 Subject: Update action mode close content description for a11y Update action mode close button text to "Cancel". Because this content description is not styleable, find the view and set content description runtime. Fix: 140364784 Test: manual Test: atest DocumentsUIGoogleTests Change-Id: I209f7da1acde5f73906221fcb15c81cdd35aaaa5 --- src/com/android/documentsui/ActionModeController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/documentsui/ActionModeController.java b/src/com/android/documentsui/ActionModeController.java index 49aeeab5c..1484c162d 100644 --- a/src/com/android/documentsui/ActionModeController.java +++ b/src/com/android/documentsui/ActionModeController.java @@ -76,6 +76,10 @@ public class ActionModeController extends SelectionObserver Log.d(TAG, "Starting action mode."); } mActionMode = mActivity.startActionMode(this); + final View closeButton = mActivity.findViewById(R.id.action_mode_close_button); + if (closeButton != null) { + closeButton.setContentDescription(mActivity.getString(android.R.string.cancel)); + } } updateActionMenu(); } else { -- cgit v1.2.3-59-g8ed1b