Commit 310fc324 authored by Yue Zhang's avatar Yue Zhang Committed by Commit Bot

Add contentDescription for container view in TabGridDialog

This CL adds contentDescription to the dialog_container_view in
TabGridDialog. By adding this, we also fix the issue of the dialog
auto-focusing on dialog toolbar back button when dialog opens. This bug
is because that without a contentDescription, dialog container view will
shift its focus automatically to its first "announce-able" child view
which is the back button and announce that in a11y mode. After this CL,
it will focus on the whole dialog and make the correct announcement
instead.

Bug: 1111962
Change-Id: I44e21dd5f8088e9903fa7306d56460ba2fc0feef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387198
Commit-Queue: Yue Zhang <yuezhanggg@chromium.org>
Auto-Submit: Yue Zhang <yuezhanggg@chromium.org>
Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803677}
parent 8941d1d5
...@@ -289,7 +289,6 @@ Still reading? ...@@ -289,7 +289,6 @@ Still reading?
<ignore regexp="The resource `R.plurals.accessibility_dialog_back_button` appears to be unused"/> <ignore regexp="The resource `R.plurals.accessibility_dialog_back_button` appears to be unused"/>
<ignore regexp="The resource `R.plurals.accessibility_dialog_back_button_with_group_name` appears to be unused"/> <ignore regexp="The resource `R.plurals.accessibility_dialog_back_button_with_group_name` appears to be unused"/>
<ignore regexp="The resource `R.string.tab_grid_dialog_toolbar_edit_group_name` appears to be unused"/> <ignore regexp="The resource `R.string.tab_grid_dialog_toolbar_edit_group_name` appears to be unused"/>
<ignore regexp="The resource `R.string.accessibility_tab_grid_dialog` appears to be unused"/>
<!-- Old-style and new-style WebAPKs use same resources for simplicity. Old-style WebAPKs do <!-- Old-style and new-style WebAPKs use same resources for simplicity. Old-style WebAPKs do
not use R.style.SplashTheme but new-style WebAPKs do. not use R.style.SplashTheme but new-style WebAPKs do.
TODO(crbug.com/971254): Remove suppression once old-style WebAPKs are deprecated. --> TODO(crbug.com/971254): Remove suppression once old-style WebAPKs are deprecated. -->
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
android:id="@+id/dialog_container_view" android:id="@+id/dialog_container_view"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:background="@drawable/tab_grid_dialog_background"> android:background="@drawable/tab_grid_dialog_background"
android:contentDescription="@string/accessibility_tab_grid_dialog">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment