accessibilitySpeechIPANotation is sometimes handy in English where a word is spelled the same but pronounced differently depending of the context. Some examples are: live, read... Or you may want to correct how VoiceOver pronounces your app's name!

Example shows how you can specify the correct pronunciation for the text “Most read” and for the word “Live” in the context of direct broadcasting, using the IPA notation. The code sets an accessibilityAttributeLabel to the UILabel (or UIView) with the string and a dictionary containing the accessibilitySpeechIPANotation attribute key and the “Most rēd” or “laɪv” values.

Example code in the image:

let liveNewsChannelView = UIView()
let attributedLabel = NSMutableAttributedString(string: "24 hour news channel. ")

attributedLabel.append(NSAttributedString(string: "Live",attributes: [.accessibilitySpeechIPANotation: "laɪv"]))

liveNewsChannelView.accessibilityAttributedLabel = attributedLabel

You may also find interesting...

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

If you want to know everything about how to "Tailor the VoiceOver experience in your data-rich apps" with the Accessibility Custom Content API, there is a WWDC21 session. https://developer.apple.com/videos/play/wwdc2021/10121/ When implementing accessibilityCustomContent, for any supplementary information, it returns an array that VoiceOver will announce in that given order. The value of the AXCustomContent first, then the label. Users can configure in VoiceOver's verbosity settings if it should say that there's more content available, or play a sound hinting that there is, or simply do nothing. So it should really be optional content as users might miss it.

Sometimes we may fail to convey to the user of things changing on the screen in a perceivable way. Toasts and similar should be announced. We may want to make clear that some content on the screen changed. Or we might want to update on progress.

Created in Swift with Ignite.

Supporting Swift for Swifts