From e50aa221bca1df52dc6924dca1fb1daab75650af Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Fri, 31 May 2019 11:22:06 -0400 Subject: Fix a11y read-twice bug Also remove a hardcoded string Test: manual with talkback Fixes: 133731969 Change-Id: I0effe046fd6edddd109335a6dd7fa6b732587d64 --- .../statusbar/notification/row/ChannelEditorDialogController.kt | 2 ++ .../systemui/statusbar/notification/row/ChannelEditorListView.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorDialogController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorDialogController.kt index b89b5cb34d7a..83a4319fd24c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorDialogController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorDialogController.kt @@ -223,6 +223,8 @@ class ChannelEditorDialogController @Inject constructor( dialog = Dialog(context) dialog.window?.requestFeature(Window.FEATURE_NO_TITLE) + // Prevent a11y readers from reading the first element in the dialog twice + dialog.setTitle("\u00A0") dialog.apply { setContentView(R.layout.notif_half_shelf) setCanceledOnTouchOutside(true) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt index 4d4976085ba9..6fe14777e41f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ChannelEditorListView.kt @@ -143,7 +143,7 @@ class ChannelRow(c: Context, attrs: AttributeSet) : LinearLayout(c, attrs) { private fun updateViews() { val nc = channel ?: return - channelName.text = nc.name ?: "(missing)" + channelName.text = nc.name ?: "" nc.group?.let { groupId -> channelDescription.text = controller.groupNameForId(groupId) -- cgit v1.2.3-59-g8ed1b