Since iOS 14, UIAccessibilityCustomAction has an initialiser that accepts an image, as well as a name and action handler. Configuring one will make your custom actions easier to spot in the Switch Control menu.

https://developer.apple.com/documentation/uikit/uiaccessibilitycustomaction/init(name:image:actionhandler:)

Two switch control menus for a tweet. One shows how it would look without passing an image for an action. iOS by default creates an icon with the first letter of the action, in capitals. If there are more than one action that start with the same letter, the next one will be shown with the second letter, in non-capitals. For example, Reply is represented with R, but Retweet is represented with e. The second menu shows each one of the options with an icon, so they're easier to spot in a menu with lots of options. The code used is the same UIAccessibilityCustomAction initialiser, but one of them passes an image, as well as a name and an action handler block.

You may also find interesting...

In iOS' Settings you can specify your preference to use bold text. This can be checked in code in a couple ways: 1. isBoldTextEnabled in UIAccessibility: https://developer.apple.com/documentation/uikit/uiaccessibility/isboldtextenabled 2. legibilityWeight from UITraitCollection: https://developer.apple.com/documentation/uikit/uitraitcollection/legibilityweight

Grouping elements when it makes sense can make a huge impact on easing navigation with some assistive technologies like VoiceOver, Switch Control, or Full Keyboard Access. It also helps on reducing redundancy.

Today I want to share something I use a lot. You can convert any article into a “podcast” by enabling Speak Screen in Accessibility Settings, switching to Safari’s Reader Mode and swiping down with two fingers from the top of the screen. I think it is a good example of how if we all knew more about how to use the assistive tech available in iOS, we would find ourselves using more of them, more often, exemplifying quite well that accessibility benefits everyone.

Created in Swift with Ignite.

Supporting Swift for Swifts