Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Include support for accessibility in the Android SDK #4857

Closed
zugaldia opened this issue Apr 26, 2016 · 7 comments
Closed

Include support for accessibility in the Android SDK #4857

zugaldia opened this issue Apr 26, 2016 · 7 comments
Labels
accessibility Integration with screen readers and other assistive technology Android Mapbox Maps SDK for Android

Comments

@zugaldia
Copy link
Member

This is the Android counterpart of #1496.

/cc: @bleege @tobrun @1ec5 @friedbunny

@zugaldia zugaldia added Android Mapbox Maps SDK for Android bug labels Apr 26, 2016
@tobrun
Copy link
Member

tobrun commented Apr 26, 2016

This will boil down to implementing contentDescription for each View on the screen.
Not sure if we can improve this by adding support for GL based content?

@1ec5
Copy link
Contributor

1ec5 commented Apr 26, 2016

For #1496, I synthesized a virtual “accessibility element” for each GL annotation. There’s no performance hit because it’s only done on demand for VoiceOver users. Hopefully a similar approach is possible on Android. If not, at least it’ll be possible for the native markers in #3276 to have contentDescriptions, right?

@tobrun
Copy link
Member

tobrun commented Apr 26, 2016

at least it’ll be possible for the native markers in #3276 to have contentDescriptions, right?

💯 but having some markers with this versus other not is not very convenient for a blind person.

@bleege bleege removed the bug label Apr 26, 2016
@adavis
Copy link

adavis commented Dec 7, 2016

This feature will be very useful for implementing testing with Espresso or UiAutomator. Is there another way to click on the map markers currently in an automated test? Also, please let me know if this belongs in a new issue. Thanks!

@tobrun
Copy link
Member

tobrun commented Dec 7, 2016

@adavis this depends on which kind of Markers you are using, if you are adding markers with MapboxMap#addMarker(Marker marker) you are adding an opengl drawn marker. Since both Espresso and UiAutomator work on the ViewHierarchy, it's not possible to rely on the concepts that those testing frameworks are exposing.

If you are adding markers with MapboxMap#addMarker(MarkerView marker), you are adding a View object on top of the map that is synchronised when the map transfroms. You are able to assign any content description to leverage the features from Espresso/UiAutomator.

Side note: is that we use Espresso to do testing internally but this is more a hack than default behaviour. We use a custom idling resource that waits until the MapboxMap object is created and call methods on that object directly (eg.MapboxMap#selectMarker(Marker marker) instead of using onView(withId(R.id.awesome_view.perform(click());). Verifying the end results can be done through validating the object itself or use some kind of screenshot based utility to validate what is rendered.

@1ec5 1ec5 added the accessibility Integration with screen readers and other assistive technology label Dec 7, 2016
@adavis
Copy link

adavis commented Dec 7, 2016

@tobrun thanks for the explanation. Since I'm already using a custom idling resource, I can just use your "hack" and rely on the MapboxMap methods as well. Thanks again!

@1ec5
Copy link
Contributor

1ec5 commented Mar 19, 2017

Fixed in #8230.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility Integration with screen readers and other assistive technology Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

5 participants