Commit c0f498fc authored by Jordan Demeulenaere's avatar Jordan Demeulenaere Committed by Commit Bot

Conditionnally append 'Swipe down to close' to BottomSheet accessibility string.

Change-Id: I2af9127a7fb62afdfb83e37fe8db10f40e986f82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1692746
Auto-Submit: Jordan Demeulenaere <jdemeulenaere@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675739}
parent b6a7b9c2
......@@ -1367,12 +1367,15 @@ public class BottomSheet
// content description until after announcing full/half height.
setFocusable(true);
setFocusableInTouchMode(true);
String swipeToClose = ". "
+ getResources().getString(R.string.bottom_sheet_accessibility_description);
setContentDescription(
getResources().getString(
getCurrentSheetContent().getSheetContentDescriptionStringId())
+ swipeToClose);
String contentDescription = getResources().getString(
getCurrentSheetContent().getSheetContentDescriptionStringId());
if (getCurrentSheetContent().swipeToDismissEnabled()) {
contentDescription += ". "
+ getResources().getString(R.string.bottom_sheet_accessibility_description);
}
setContentDescription(contentDescription);
if (getFocusedChild() == null) requestFocus();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment