Fix talkback doesn't speak subtext info
In the original design, we only set title description for view holder, this is wrong. It causes talkback can't speak subtext info. Currently, we set the title content description in the title view directly, so talkback can say the title and subtext now when talkback focus on an app view. Test: Talkback speaks full information for an app entry Fix: 177873163 Change-Id: I94996d596a85cc2813ed1b10cdd4ed2bee62f4a9
This commit is contained in:
@@ -69,6 +69,22 @@ public class ApplicationViewHolderTest {
|
||||
assertThat(mHolder.mSummary.getText()).isEqualTo(mContext.getText(R.string.disabled));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setTitle_titleIsNotEmptyAndContentIsNotEmpty_shouldSetTitleAndContentDescription() {
|
||||
mHolder.setTitle("title", "content");
|
||||
|
||||
assertThat(mHolder.mAppName).isEqualTo("title");
|
||||
assertThat(mHolder.mAppName.getContentDescription()).isEqualTo("content");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setTitle_titleIsNotEmptyButContentIsEmpty_shouldSetTitle() {
|
||||
mHolder.setTitle("title", "");
|
||||
|
||||
assertThat(mHolder.mAppName).isEqualTo("title");
|
||||
assertThat(mHolder.mAppName.getContentDescription()).isEqualTo("title");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateSize() {
|
||||
final String invalidStr = "invalid";
|
||||
|
Reference in New Issue
Block a user