[android] - add accessibility support to the Android SDK by applying content descriptions on Views overlain on the map. (#8230)
This commit is contained in:
@@ -636,6 +636,7 @@ public class MarkerViewManager implements MapView.OnMapChangedListener {
|
||||
viewHolder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
viewHolder.imageView.setImageBitmap(marker.getIcon().getBitmap());
|
||||
viewHolder.imageView.setContentDescription(marker.getTitle());
|
||||
return convertView;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,9 @@ public class MapView extends FrameLayout {
|
||||
ImageView attrView = (ImageView) view.findViewById(R.id.attributionView);
|
||||
initalizeDrawingSurface(context, options);
|
||||
|
||||
// add accessibility support
|
||||
setContentDescription(context.getString(R.string.mapbox_mapActionDescription));
|
||||
|
||||
// create native Map object
|
||||
nativeMapView = new NativeMapView(this);
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ public final class CompassView extends AppCompatImageView implements Runnable, F
|
||||
|
||||
private void initialize(Context context) {
|
||||
setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.mapbox_compass_icon));
|
||||
setContentDescription(getResources().getString(R.string.mapbox_compassContentDescription));
|
||||
setEnabled(false);
|
||||
|
||||
// Layout params
|
||||
|
||||
Reference in New Issue
Block a user