iosswiftaccessibility

how to add accessibility to interactive dismissal of presented view controller


I have a view controller which can be dismissed by swiping down. How can I make it accessible for the visually impaired users. Is there any gesture to close the screen which I can add as accessibility label or trait.


Solution

  • First of all, as mentioned in comments, you should provide an alternative other than a gesture to close your widget. There are several good reasons to do so:

    AS a bonus, ideally, you should react to the VoiceOver back gesture, too. It is also known as Z gesture, because it consists of drawing a shape ressembling a Z with two fingers.

    This gesture allows to go back or close something without the need to find a close button anywhere on the screen, and so is a lot faster.

    Note that another quick go back gesture similarely exists for Talkback on Android, so this answer can in principle also apply to any mobile device.