wdullaer/MaterialDateTimePicker

Make TalkBack only read the value changed when something changes

Open

#617 创建于 2019年10月4日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Java (4,665 star) (961 fork)batch import
bughelp wanted

描述

Thanks for the great library!

We're experiencing an issue when using the timepicker with TalkBack enabled.

If you are on for example "Hour mode" (i.e. selecting hours), and you use 2 fingers to swipe to an hour, TalkBack only reads the seconds out loud. I.e "00". The same goes for minutes. If you are in AM/PM mode it only reads AM or PM.

I think this is related to the onValueSelected method in TimePickerDialog which sets the hours, minutes, seconds and amPmDisplay. These setters will in turn call Utils.tryAccessibilityAnnounce(mTimePicker, text);, which will try to read out the values. However, since the announcements all come at almost the same time, TalkBack will only announce the latest value. Which will either be the seconds or AM/PM.

Not sure what the best way is to fix this is. Maybe to diff the old value with the new value and only announce it if it's different?

贡献者指南

Make TalkBack only read the value changed when something changes · wdullaer/MaterialDateTimePicker#617 | Good First Issue