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.
You may also find interesting...
An accessibility trait is the role of the component. Among other things, it gives the user information on how they can interact (or not) with it. When using VoiceOver, the trait is usually (not always) read after the accessibility label. At the time of writing this tweet, there are 18 different accessibility traits: https://developer.apple.com/documentation/uikit/uiaccessibilitytraits Some examples are: button, header, selected, adjustable or not enabled.

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 code in the image: ```swift let liveNewsChannelView = UIView() let attributedLabel = NSMutableAttributedString(string: "24 hour news channel. ") attributedLabel.append(NSAttributedString(string: "Live",attributes: [.accessibilitySpeechIPANotation: "laɪv"])) liveNewsChannelView.accessibilityAttributedLabel = attributedLabel ```

accessibilitySpeechSpellOut asks VoiceOver to speak the sequence of characters. Can be useful for things like promo/reference/authentication codes, phone numbers... it makes more sense to announce each character rather than words and big numbers. Example code in the image: ```swift let codeLabel = UILabel() let attributedLabel = NSAttributedString( string: "BAC1234567D", attributes: [.accessibilitySpeechSpellOut: true] ) title.accessibilityAttributedLabel = attributedLabel ```
Content © Daniel Devesa Derksen-Staats on Accessibility up to 11! is licensed under CC BY 4.0. License details