accessibilitySpeechPitch lets you emphasise something changing VoiceOver's pitch. The value goes from 0.0 to 2.0. The default is 1.0. Twitter could change pitch to read hashtags, for example, avoiding repetition but still signalling they're there.

Example shows how you can specify changing the pitch for a portion of an attributed accessibility label, using the accessibilitySpeechPitch attribute, for hashtags on a tweet. By default VoiceOver would read something like “Writing about developing accessible hashtag iOS apps in hashtag 365 days iOS Accessibility hashtag accessibility hashtag a 11 y”. There’s lots of repetition of the word hashtag. But it could be changed so it says “Writing about developing accessible iOS apps in 365 days iOS Accessibility accessibility a 11 y” where iOS, 365 days iOS accessibility, accessibility and a 11 y, is read with a lower pitch of 0.7.

You may also find interesting...

Have you noticed that the first time you select an element on Apple Podcast's mini player, VoiceOver says "Mini player", and then, it describes the selected element? It gives the user more context on what "feature" those elements belong to. This can be achieved in UIKit by configuring the accessibility container type of the mini player with .semanticGroup and giving it an accessibility label, in this case: "Mini player". https://developer.apple.com/documentation/objectivec/nsobject-swift.class/accessibilitycontainertype https://developer.apple.com/documentation/uikit/uiaccessibilitycontainertype/semanticgroup

Guidelines from Apple: Begin with a verb that explains the results of the action. Avoid using the imperative form of a verb because that can make it sound like a command. Don’t include the action type. Don’t include the control. https://developer.apple.com/documentation/objectivec/nsobject-swift.class/accessibilityhint

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