MKMapView and Accessibility

As I currently live in ReactNative Hell, I like to flesh out all my native iOS demos and samples to the max. Including things like accessibility. Recently, I wrote a very simple demo containing a map, and I stumbled upon some issues I was unable to resolve. I think they present very general usecases, and so I would be happy if anyone of you had any idea.

The condensed source code for the issues can be found on GitHub

Issue 1: The Phantom Overlay

To reproduce Run the app on a device, and be sure that VoiceOver is on. Swipe right to get to the Annotations.

Expected Result The title of the annotation is read.

Actual Result The title of the annotation is read twice.

What I know For every annotation on the map view, there is also an overlay, an MKCircle, generated by an MKCircleRenderer. When this overlay is not present, the title is — correctly — only read once.

What I have tried In ViewController.swift, lines 54 and 92, I have set both the overlay's and the renderer's isAccessibilityElement property to false. This does not fix the issue (probably because neither of them are the actual views).

The overlay should never be an accessible element. Any information should be encoded in the annotation (e.g. "There is a 10m region around this marker")

Issue 2: The Unknown Trait

While it is correct that the title of the annotation should be read, there is no indication that the annotation can be clicked or interacted with. I have set annotationView.accessibilityTraits = [.button], but this does not change anything. My expectation would be "Cologne Cathedral, Button" or a similar hint that the item is clickable.

Issue 3: The Unreachable Callout

With VoiceOver active, click on an annotation. I have taken some hints from Stackoverflow, and tried to disable the accessibility on the annotation, and enable it on the callout. This leads to the callout being reachable somehow, but it is absolutely not obvious if you can not see the screen.

How can I indicate to the VoiceOver user that now a callout is being shown?

A Working Extra: The Annotation Rotor

The app also contains a custom rotor, to go through the annotations one by one, without also reading the default Points-Of-Interest on the map. Interestingly (or maybe rather as expected), the title of the annotation is correctly only read once.

I whould be extremely happy to get some feedback on these issues, it sounds like most of them could be rather common.

Thanks!

Alex

Replies

Hi!

I have the exact same issue. Did you solve this?