Bug 1137483 - Set content description of SearchEngineBar items. r=liuche

I tested with Talkback to ensure only the outer container of each search engine
favicon is selected.
This commit is contained in:
Michael Comella 2015-04-22 16:45:23 -07:00
parent 5f85a2e291
commit 39ab2404db
2 changed files with 5 additions and 0 deletions

View File

@ -98,6 +98,10 @@ public class SearchEngineBar extends TwoWayView
final SearchEngine searchEngine = searchEngines.get(position);
faviconView.updateAndScaleImage(searchEngine.getIcon(), searchEngine.getEngineIdentifier());
final View container = view.findViewById(R.id.search_engine_icon_container);
final String desc = getResources().getString(R.string.search_bar_item_desc, searchEngine.getEngineIdentifier());
container.setContentDescription(desc);
return view;
}
}

View File

@ -11,6 +11,7 @@
View (browser_search at the time of this writing). -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/search_engine_icon_container"
android:layout_height="match_parent"
android:layout_width="72dp"
android:background="@color/pressed_about_page_header_grey">