summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tony Huang <tonyychuang@google.com> 2019-09-05 16:23:49 +0800
committer Tony Huang <tonyychuang@google.com> 2019-09-05 16:49:53 +0800
commitddf0b51d16f05ff699eb4880c8b97f62443d52c2 (patch)
tree6704ad24cd728e4f346a77f4686b1878b6498445
parentc12e4d608c1cee4fdf95d1455b83477e208eed5b (diff)
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
-rw-r--r--src/com/android/documentsui/ActionModeController.java4
1 files changed, 4 insertions, 0 deletions
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<String>
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 {