commit | 3be0e4fbb5a6e4632f9a1d58a5ab21fb5765d286 | [log] [tgz] |
---|---|---|
author | Jiyong Park <jiyong@google.com> | Tue Nov 26 14:56:43 2024 +0900 |
committer | Jiyong Park <jiyong@google.com> | Tue Nov 26 14:56:43 2024 +0900 |
tree | 883b58c9b28bf1595c46cc391b5f8d1cde6a9f60 | |
parent | 712adeab82f2057958a9e3026985e1035a2b1cd4 [diff] |
Speak something for the invisible element The invisible element in the terminal app is an artifact from how ttyd is implemented. Ideally, the element shouldn't get a11y focus, but we struggled to prevent that. As long as the element gets a11y focus, we should speak something on the element. Bug: 376196669 Test: follow the instruction in the bug Change-Id: Ie06eb32b5683abc509192ec201cf1c3fa0af4a31
diff --git a/android/TerminalApp/java/com/android/virtualization/terminal/TerminalView.java b/android/TerminalApp/java/com/android/virtualization/terminal/TerminalView.java index 274f423..efee62f 100644 --- a/android/TerminalApp/java/com/android/virtualization/terminal/TerminalView.java +++ b/android/TerminalApp/java/com/android/virtualization/terminal/TerminalView.java
@@ -244,6 +244,7 @@ info.getBoundsInScreen(rect); if (rect.width() == 0) { info.setText(null); + info.setContentDescription(getString(R.string.empty_line)); } info.setScreenReaderFocusable(false); break;