Commit Graph

6 Commits

Author SHA1 Message Date
Minh Nguyễn
51cd97861c [ios] Announce zoom level, visible annotations after zooming
Announce the zoom level and number of visible annotations after zooming using VoiceOver’s swipe up or swipe down gesture.

Works toward #4821.
2016-04-26 16:47:04 -07:00
Minh Nguyễn
193a843013 [ios] Fixed ℹ️, user dot accessibility
The user location annotation view is created lazily, so if the user dot isn’t within view at launch, it doesn’t exist by the time UIKit first queries MGLMapView for child accessibility elements. This caused console spew about missing accessibility elements and prevented the ℹ️ from being visible to XCUITest.
2016-04-26 14:19:05 -07:00
Minh Nguyễn
d9a2a845de [ios] Added accessibility labels, hints, gestures
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.
2016-04-25 00:24:35 -07:00
Minh Nguyễn
893a777a2f [ios] Made compass and user dot accessible
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”.)
2016-04-25 00:16:28 -07:00
Minh Nguyễn
f1200d47db [ios, osx] Made localizable strings unique; unlocalized iosapp
Assigned unique IDs to localizable English strings in code.

Made iosapp non-localizable. For the time being, it isn’t worth the trouble to localize more strings for this demo application than for the SDK itself.
2016-04-24 16:17:43 -07:00
Minh Nguyễn
6c9ca4be50 [ios] Made SDK and iosapp localizable
Made storyboards and strings throughout the SDK and iosapp localizable. Replaced the compass image with an unlabeled image. Draw a localizable string atop it at runtime.

Redefined NSLocalizedString() and NSLocalizedStringFromTable() macros to look at the SDK bundle rather than the main application bundle. This redefinition has no effect on the host application, because it’s in an internal header. That header must be included in all files that contain localizable strings. See NSBundle+MGLAdditions.h for a full explanation.

Added a make rule that runs genstrings and ensures UTF-8 output (since genstrings insists on UTF-16).

Use MGLCoordinateFormatter in iosapp for dropped pin callouts. Rely on subclasses of MGLPointAnnotation instead of annotation titles to distinguish between different kinds of point annotations.
2016-04-24 16:13:08 -07:00