[MaterialDatePicker] Talkback does not announce initially selected date as "selected"
Description: An initially selected date (e.g., a date set using MaterialDatePickerBuilder.datePicker().setSelection()) is not announced as "selected" when using Talkback. It is necessary for the user to interactively select a date at which point "selected" will be prepended to the announcement of the date. After that, Talkback will correctly announce the selected date.
Expected behavior: Regardless of whether the date is initially selected or interactively selected, Talkback should announce "selected" when swiping to the selected date.
Source code:
Add the following to an Activity's "onCreate" to build and show a date picker dialog :
var datePicker = MaterialDatePicker.Builder.datePicker().setSelection(Date().time).build() .show(supportFragmentManager,"")
Note that when initially swiping to the selected date, it will not be announced as selected (see attached video).
Android API version: 34
Device: Pixel 5
Material Library Version : com.google.android.material:material:1.9.0
Source: material-components/material-components-android