Post

Replies

Boosts

Views

Activity

NSAttributedString.Key.accessibilitySpeechIPANotation in substrings
Hi, I am trying to improve the pronunciation of a couple of words within a large block of text for VoiceOver users by applying the .accessibilitySpeechIPANotation key to a range in an NSAttributedString. However it appears that the notations are ignored when the range is in the middle of the text. It only seems to apply if the attributed range is at the end of a sentence. For example, using this code sample: let s: String = "live radio" let ipa = "ˈla͡ɪv" let attributedString = NSMutableAttributedString(string: s) let range = attributedString.string.range(of: "live") attributedString.addAttributes(     [.accessibilitySpeechIPANotation: ipa],     range: NSRange(range!, in: attributedString.string)) label.attributedText = attributedString the label will be read incorrectly ("live" rhyming with "give"). However if s = "listen on radio live" or "listen on radio live. today!" then it's read correctly. Then if I change it to `"listen on radio live today!", it's wrong again. What am I missing? Is there some sort of "end of word" symbol I need to include in my IPA notation? (This is on iOS 15. It seems to work like I expect on iOS 12 FWIW).
2
0
630
Sep ’21
Inline UIDatePicker accessibility labels ignore configured timezone
I have a date picker using the new inline style configured to use a specific timezone like so: let aucklandDatePicker = UIDatePicker() aucklandDatePicker.datePickerMode = .date aucklandDatePicker.preferredDatePickerStyle = .inline aucklandDatePicker.timeZone = TimeZone(identifier: "Pacific/Auckland")! When run on a device in a vastly different timezone (e.g. Anchorage, USA), the accessibility labels for the dates in the date picker do not match what is displayed. For example the date displayed as Friday, January 15, 2021 (today in Auckland) has the accessibility label "Today, Thursday, January 14" (which would be correct in Anchorage). Is there something I am missing?
0
0
774
Jan ’21