Day 64

Reach grouped buttons with custom actions

21 Jul 2022

Optimising for navigation by making a view accessible shouldn’t come at the expense of the buttons in it not being accessible. Configuring custom actions will allow the user to access them using the Actions rotor.

Twitter app open. VoiceOver's focus is on the first tweet. There are four steps required to execute a custom action. One: Rotate two fingers on the screen to show the rotor menu. Two: Continue doing so, till you find the Actions rotor. Three: Swipe up/or down (VoiceOver will start announcing the different actions: Activate, Default; Reply; Retweet; Like; Share via...; View tweet author's profile, etc). Four: Stop in the desired action and double tap to execute. A piece of code shows how you can configure an array of custom actions. Each element in the array is of type UIAccessibilityCustomAction and you initialise them with a name and an action handler.

With the Actions rotor, users can swipe up and down to cycle through all the options, stop at the desired one, and double tap to execute that action.

You can configure an array of custom actions. Custom actions can have a name that will be announced by VoiceOver and an action handler or target selector with the code that will be executed.

https://developer.apple.com/documentation/objectivec/nsobject-swift.class/accessibilitycustomactions

Some of you have asked me how you can support what I do. This would really help, and would be hugely appreciated:

  • Find these posts useful? Share them at work, on social media, or with anyone that might find them interesting. Let's spread the word!

  • Check out any of my apps or games: Xarra!, RetroRapid!, or Mestre!.

    • A download and a review go a long way. They're free by default. On the App Store, ratings and reviews really help more people discover them.

    • Finding any of them useful? If so, and if you can afford it, purchasing lifetime access to all features or subscribing lets me buy the coffee that keeps me caffeinated. Caffeine keeps me going to maintain the apps, bring in new features that I hope you'll love, and keep writing.

You may also find interesting...

Once you learn some basic gestures with VoiceOver, it is very important to master he Rotor. It is very useful to also know some more power user gestures like the Magic Tap or the Escape gesture.

Meet the rotor. A menu that you activate (and change options) by rotating two fingers on the screen. It lets you select different navigation modes and customizations. Like navigating through headings or changing VoiceOver’s speaking rate.

@JanJaapdeGroot presented the ScreenReader app for An app to help anyone learn VoiceOver's gestures in a very creative and playful way.


Content © Daniel Devesa Derksen-Staats on Accessibility up to 11! is licensed under CC BY 4.0. License details