Bug 1137483 - Set content description of SearchEngineBar items. r=liuche
☠☠ backed out by 925dd58e0035 ☠ ☠
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 22 Apr 2015 16:45:23 -0700
changeset 272994 22567ae1d44d9b6a5c078facd636feda49af98a0
parent 272993 f6c941bae29665c225bd919bddb50dfd596f66b3
child 272995 a4228f6ef8cefeece8a55a17ce1fcec91db2968f
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs1137483
milestone40.0a1
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.
mobile/android/base/home/SearchEngineBar.java
mobile/android/base/resources/layout/search_engine_bar_item.xml
--- 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). -->
 <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">
 
     <!-- Width & height are set to make the Favicons as sharp as possible
          based on asset size. -->
     <org.mozilla.gecko.widget.FaviconView
         android:id="@+id/search_engine_icon"