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

VoiceOver accessibility #1496

Merged
merged 6 commits into from
Apr 25, 2016
Merged

VoiceOver accessibility #1496

merged 6 commits into from
Apr 25, 2016

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented May 10, 2015

The changes in this PR are intended to reach parity with MapKit basic user expectations in terms of VoiceOver accessibility.

By comparison, MapKit has pretty good accessibility, while Google Maps is largely inaccessible on iOS.

There are also architectural improvements in this PR:

@1ec5 1ec5 added feature iOS Mapbox Maps SDK for iOS labels May 10, 2015
@1ec5 1ec5 added this to the iOS Beta 3 milestone May 10, 2015
@1ec5 1ec5 self-assigned this May 10, 2015
@1ec5
Copy link
Contributor Author

1ec5 commented May 11, 2015

Annotations are now accessible, but it requires more work to find a visible annotation by its unique ID than I’d like. Given how many times annotationIDsByAnnotation’s key enumerator is being turned into a sorted array in various parts of MGLMapView, I think annotationIDsByAnnotation should be inverted to map annotation IDs to dictionaries that contain annotations and their accessibility elements.

@incanus
Copy link
Contributor

incanus commented May 11, 2015

This is gonna be great.

Once we hit #352 at get a featuresAt() equivalent, we can start to think about iterating navigation elements on the map as well like Apple Maps does — streets, POIs, etc.

@1ec5
Copy link
Contributor Author

1ec5 commented May 11, 2015

Once we hit #352 at get a featuresAt() equivalent, we can start to think about iterating navigation elements on the map as well like Apple Maps does — streets, POIs, etc.

To my knowledge, Apple Maps' VoiceOver support when simply viewing the map is limited to POIs. But it'd be awesome if we could use pick out road labels to deliver more comprehensible location readouts at high zoom levels ("near the corner of Broad and High Streets, facing Central Park"), instead of prosaic coordinates and compass directions, without requiring separate calls to a geocoder.

@incanus
Copy link
Contributor

incanus commented May 11, 2015

To my knowledge, Apple Maps' VoiceOver support when simply viewing the map is limited to POIs.

Nah, they do all places visible + roads by default. Here's an example:

https://dl.dropboxusercontent.com/u/575564/voiceover.mp4

Sorry about the annoying speed I went through it — wasn't hearing the audio when recording so wasn't sure it was working.

@1ec5
Copy link
Contributor Author

1ec5 commented May 12, 2015

Nah, they do all places visible + roads by default.

Oh cool, although it must be really annoying to have to sift through all the road labels just to get to a POI. Our developers are mostly presenting maps where the annotations matter much more than the base map, so once feature picking gets us granular accessibility elements, we’ll need to make the level of detail configurable.

@1ec5 1ec5 modified the milestones: iOS Beta 2, iOS Beta 3 May 12, 2015
@1ec5 1ec5 changed the title [WIP] VoiceOver accessibility [WIP] VoiceOver accessibility; reverse annotation mapping May 14, 2015
1ec5 added a commit to mapbox/SMCalloutView that referenced this pull request May 16, 2015
@1ec5
Copy link
Contributor Author

1ec5 commented May 22, 2015

2e71630 most likely fixes #1628.

@1ec5 1ec5 force-pushed the 1ec5-a11y-1493 branch 2 times, most recently from e213194 to cb34703 Compare April 21, 2016 19:18
@1ec5
Copy link
Contributor Author

1ec5 commented Apr 22, 2016

I split out and cleaned up the display string formatting in #4802.

@1ec5 1ec5 force-pushed the 1ec5-a11y-1493 branch 4 times, most recently from f535755 to d63401f Compare April 25, 2016 06:56
Enabled direct interaction with `MGLMapView`, allowing for panning and so forth. Defined an accessibility value that announces the current center coordinate. Inset the map view accessibility frame to exclude ornaments from the interactive element.
Made the compass behave like a button when visible. Added accessibility values and hints. The compass’s accessibility value uses the compass direction formatter. Turned off direct interaction with the map because it obscures the ornaments.

The user dot now reports the current coordinates. Its accessibility label now reflects its annotation’s title instead of the hardcoded label “User location”. (It’d be weird to address the VoiceOver user as “user”.)
Lazily create and cache accessibility elements for visible annotations as UIAccessibility asks about them.

Sort the annotations’ accessibility elements by the annotations’ distance from the logical center (the center after accounting for padding, or the user dot when user tracking mode is on).

Updated the changelog.

Fixes #1493.
Put the user dot back into rotation as an accessible element.
Via nfarina/calloutview#84, SMCalloutView is now accessible. Activating a focused annotation now shows its callout view and focuses its left accessory view, if present, or the title view. There is a “return to map” accessibility element for dismissing the callout view and restoring focus to the annotation on the map.
Fixed an issue where the “return to map” accessibility element lacked a label. Always update the title and subtitle of an annotation accessibility element, in case the title or subtitle changes from one showing to the next.

Added a hint for annotations. Use declarative rather than imperative for hints.

Marked the map view and its annotations as adjustable so that swiping up and down with VoiceOver zooms out and in, respectively.

Added accessibility values to toolbar buttons in iosapp.
@1ec5 1ec5 removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Apr 25, 2016
@1ec5 1ec5 changed the title [WIP] VoiceOver accessibility VoiceOver accessibility Apr 25, 2016
@1ec5
Copy link
Contributor Author

1ec5 commented Apr 25, 2016

@boundsj, these changes shouldn’t conflict too badly with what you’re working on in #4801, but you’ll want to update some of this logic for annotation views. For example, a view-based annotation’s accessibility frame should be the view’s frame instead of the return value of -frameOfImage:centeredAtCoordinate:. A further optimization would be to have the annotation view be the annotation’s accessibility element, but I don’t think that’s strictly necessary.

@1ec5
Copy link
Contributor Author

1ec5 commented Apr 25, 2016

Filed #4820, #4821, #4822, #4823 to track further accessibility work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS
Projects
None yet
3 participants