If your app lets the user share images, consider implementing the possibility for them to add an alt text for the image, so it can be used as an accessibility label when consumed by other users. Twitter or Slack have nice flows for doing this.

The Twitter app is open. It shows how when adding an image in the tweet composing screen, there is a button to alt text that opens another screen that lets you write a description of up to 1000 characters. Then, if a tweet has an image with alt text, it shows an ALT badge in the bottom left corner that can be selected to open a bottom sheet with the image's alt text.

You may also find interesting...

This is a small trick I use to compose complex accessibility labels/values when, for a UI component, some elements might not be in all its instances. An array of optional Strings, compact map, and join all elements by a separator, like a comma.

Color contrast between text and background is very important for perceivability. As colors come closer to each other, they’re more difficult to distinguish. Notice that colors that work well with big font sizes may not for smaller text.

Hacks are accessibility’s worst enemy. An example. There is a ‘trick’ floating on the internet: if you want a button with an icon to the right of the text, set the semantic content attribute to force right to left. Great way to create focus traps.

Created in Swift with Ignite.

Supporting Swift for Swifts