[Wi-Fi] [a11y] The "Advanced options" should be accessible by Voice Access and pronounced by talkback correctly.

The checkbox is unclickable via Accessibility.

Solution: Refine the solution of b/30079196 to let checkbox be focusable and clickable by Accessibility, and remove unnecessary Accessibility pronunciation strings.

Bug: 141588638
Bug: 141588161
Test: Add unit test to check the content description of the checkbox.
Change-Id: I2e7932f64ae29a13b793276eab6705009af20104
This commit is contained in:
govenliu
2019-10-17 15:57:57 +08:00
parent ca3639a668
commit 116060e011
4 changed files with 48 additions and 14 deletions

View File

@@ -368,14 +368,14 @@
android:layout_height="wrap_content"
style="@style/wifi_item"
android:paddingBottom="4dp"
android:importantForAccessibility="yes"
android:contentDescription="@string/wifi_advanced_toggle_description_collapsed"
android:importantForAccessibility="no"
android:visibility="gone">
<CheckBox android:id="@+id/wifi_advanced_togglebox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_advanced_toggle"
android:importantForAccessibility="noHideDescendants"
android:importantForAccessibility="yes"
android:contentDescription="@string/wifi_advanced_toggle_description"
android:text="@string/wifi_show_advanced" />
</LinearLayout>