[A11y] Add battery chart slot selected status in content description.

- Let talkback annouce the slot status before battery slot info.
"Selected": If current slot is selected or after the double-tap action to selected a slot.
"Unselected": If current slot is not the seletectd one or after double-tapping an already selected slot(which will selected ALL instead)

Fix: 386027256
Test: Talkback
Flag: EXEMPT for simple fix
Change-Id: I32a665cdf21620aade8397e5bbe4cb44964b0a39
This commit is contained in:
mxyyiyi
2025-03-05 19:19:09 +08:00
parent 744ed22075
commit e853b6b267
3 changed files with 71 additions and 59 deletions

View File

@@ -6600,8 +6600,12 @@
<string name="battery_usage_timestamps_content_description"><xliff:g id="from_timestamp">%1$s</xliff:g> to <xliff:g id="to_timestamp">%2$s</xliff:g></string>
<!-- [CHAR_LIMIT=NONE] The first slot is a week day (e.g. "Monday"); the second slot is a hourly time span (e.g. "6 AM - 8 AM"). -->
<string name="battery_usage_day_and_hour"><xliff:g id="day">%1$s</xliff:g> <xliff:g id="hour">%2$s</xliff:g></string>
<!-- [CHAR_LIMIT=NONE] Accessibility content description for each slot in battery chart view. -->
<string name="battery_usage_time_info_and_battery_level"><xliff:g id="time_info" example="Battery usage for Monday 6 AM - 8 AM">%1$s</xliff:g> <xliff:g id="battery_level" example="Battery level percentage from 83% to 59%">%2$s</xliff:g></string>
<!-- [CHAR_LIMIT=NONE] Accessibility content description for each slot in battery chart view. Please reuse the words in tc/6732629268310936155 -->
<string name="battery_usage_status_time_info_and_battery_level"><xliff:g id="selected_status" example="Selected">%1$s</xliff:g>, <xliff:g id="time_info" example="Battery usage for Monday 6 AM - 8 AM">%2$s</xliff:g> <xliff:g id="battery_level" example="Battery level percentage from 83% to 59%">%3$s</xliff:g></string>
<!-- [CHAR_LIMIT=NONE] Accessibility content description for the battery usage slot is selected. -->
<string name="battery_chart_slot_status_selected">Selected</string>
<!-- [CHAR_LIMIT=NONE] Accessibility content description for the battery usage slot is not selected -->
<string name="battery_chart_slot_status_unselected">Unselected</string>
<!-- [CHAR_LIMIT=NONE] Accessibility content description for battery chart view. -->
<string name="battery_usage_chart">Battery usage chart</string>
<!-- [CHAR_LIMIT=NONE] Accessibility content description for daily battery chart view. -->