Bug 1137483 - Set content description of SearchEngineBar items. r=liuche
☠☠ backed out by c3fe4dd112b2 ☠ ☠
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 22 Apr 2015 16:45:23 -0700
changeset 272491 501e46e3e348fdf8e503f330d40d538456d10544
parent 272490 a7ba18a83520fe460148f766b8cc38f0252bb908
child 272492 3a1669b7df0f9e78b216e807962847023cd92dd5
push id4830
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:18:48 +0000
treeherdermozilla-beta@4c2175bb0420 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.
--- a/mobile/android/base/home/SearchEngineBar.java
+++ b/mobile/android/base/home/SearchEngineBar.java
@@ -93,16 +93,20 @@ public class SearchEngineBar extends Two
             } else {
                 view = convertView;
             final FaviconView faviconView = (FaviconView) view.findViewById(R.id.search_engine_icon);
             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;
      * A Container to surround the SearchEngineBar. This is necessary so we can draw
      * a divider across the entire width of the screen, but have the inner list layout
      * not take up the full width of the screen so it can be centered within this container
--- a/mobile/android/base/resources/layout/search_engine_bar_item.xml
+++ b/mobile/android/base/resources/layout/search_engine_bar_item.xml
@@ -6,16 +6,17 @@
 <!-- TwoWayView doesn't let us set the margin around items (except as
      gecko:itemMargin, but that doesn't increase the hit area) so we
      have to surround the main View by a ViewGroup to create a pressable margin.
      Note: the layout_height values are shared with the parent
      View (browser_search at the time of this writing). -->
+    android:id="@+id/search_engine_icon_container"
     <!-- Width & height are set to make the Favicons as sharp as possible
          based on asset size. -->