Adding move actions to rotor in an app

By MuseumShuffle, 20 May, 2023

Forum
App Development and Programming

Hello!

I'm a developer and one of my blind users gave me some wonderful feedback for my app, Please Don't Rain. He asked for a way to save your favorite locations that you like to look up the weather for.

I show the favorites in a list and I made sure that you can reorder them with drag and drop with VoiceOver enabled. Here's some feedback he gave me:

with voiceover you can add the move up, or move down option to the actions rotor. This is how a lot of the apps allow voiceover users to drag items into a different order. as of right now the only thing that shows up in the actions rotor for voiceover users is the swipe to delete option. You could place the move up or move down options in the same menu.

Here's where I'm confused. Since the app is already allowing move via drag and drop I thought that I would just go to the rotor settings in iOS and enable move up/down. But I don't see any action that appears to match that.

Or are "move up" and "move down" things that I need to add programmatically in the app itself even though I already added a general "move" that lets you move up and down?

I've been trying to find answers via Google for both approaches and have come up with nothing helpful.

Options

Comments

By MuseumShuffle on Tuesday, May 23, 2023 - 04:53

In researching this some more I think what I need to do is add a SwiftUI accessibilityActions modifier. I don't think it's a setting in iOS I'm not seeing.

By Manuel on Tuesday, May 23, 2023 - 04:53

Yes, you're right. You have to add an accessibilityAction modifier to the view where VoiceOver users should be able to find and invoke the action. Then define what the action should do after it's been invoked by adding appropriate code inside the closure.

By MuseumShuffle on Tuesday, May 23, 2023 - 04:53

Thanks Manuel. Right now I'm struggling. The custom move seems to work the first time, but if you try to move the same item again then it moves back to its original spot. The closure seems to be capturing the index values of my array and then not updating when the move takes place.

Details here: https://mastodon.social/@MuseumShuffle/110406774432327771