[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

@@ -557,4 +557,12 @@ public class WifiConfigControllerTest {
assertThat(firstChild).isEqualTo(hiddenSettingLayout);
}
@Test
public void getAdvancedOptionContentDescription_whenViewInitialed_shouldBeCorrect() {
final CheckBox advButton = mView.findViewById(R.id.wifi_advanced_togglebox);
assertThat(advButton.getContentDescription()).isEqualTo(
mContext.getString(R.string.wifi_advanced_toggle_description));
}
}