Skip to content

Commit 1200e25

Browse files
paulfthomasdsn5ft
authored andcommitted
[MaterialDatePicker][a11y] Improve date input validation feedback follow up
PiperOrigin-RevId: 498167309 (cherry picked from commit cd5246f)
1 parent f394903 commit 1200e25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/java/com/google/android/material/datepicker/MaterialDatePicker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ public void onClick(View v) {
305305
public void onInitializeAccessibilityNodeInfo(
306306
@NonNull View host, @NonNull AccessibilityNodeInfoCompat info) {
307307
super.onInitializeAccessibilityNodeInfo(host, info);
308-
info.setContentDescription(getDateSelector().getError());
308+
String contentDescription = getDateSelector().getError() + ", " + info.getText();
309+
info.setContentDescription(contentDescription);
309310
}
310311
});
311312

0 commit comments

Comments
 (0)