accessibilitySpeechIPANotation is useful for indicating how foreign words are pronounced. It really annoys me to hear the word paella constantly mispronounced 😁. You could also specify language, but this way, VoiceOver won't change its voice.

Example, with a drawing of the paella emoji, shows how you can specify the correct pronunciation for the text “paella” using the IPA notation. The code sets an accessibilityAttributeLabel to the UILabel with the string and a dictionary containing the accessibilitySpeechIPANotation attribute key and the “pɑːˈeɪə” value.

Example code in the image:

let recipeNameLabel = UILabel()
let attributedLabel = NSAttributedString(
    string: "Paella",
    attributes: [.accessibilitySpeechIPANotation: "pɑːˈeɪə"]
)

recipeNameLabel.accessibilityAttributedLabel = attributedLabel

You may also find interesting...

Believe it or not, one of the most common accessibility pitfalls I see in iOS apps, is forgetting to configure a suitable accessibility label for buttons with just an image (no title), resulting in VoiceOver saying just: "button". Why for buttons with just an image? If it has a title, the accessibility label gets inferred from it. So here's one that should be very easy for you to find and fix in your app. No more apps that just say: button, button, button, button...! If you are looking for the best explanation on what makes, not good, but great accessibility labels, I really recommend “Writing Great Accessibility Labels” by @jordyn2493 at WWDC. The difference between someone using/loving/deleting your app. https://developer.apple.com/videos/play/wwdc2019/254/

An interesting speech attribute for attributed accessibility labels is accessibilitySpeechIPANotation that lets you specify how VoiceOver should pronounce a label with the International Phonetic Alphabet (IPA) notation. https://developer.apple.com/documentation/foundation/nsattributedstring/key/accessibilityspeechipanotation

Sometimes your UI will just not scale for large text sizes. Simple changes, for large sizes, like disposing elements vertically instead of horizontally, reducing the number of columns, and allowing more lines of text, can do the trick most times.

Created in Swift with Ignite.

Supporting Swift for Swifts