Hey guys,
I have an NSAttributedString
within my app (created from HTML). I assign this string to a UITextView
.
I would like certain parts of that text to be marked with an 'header' accessibility trait (all the headlines in that text) so that voice over can identify them properly.
I was under the impression that I can just use accessibilityTextHeadingLevel
to do so, but the text in that given range is still setup with the 'text' accessibility trait:
var myString = NSMutableAttributedString(...)
let range = NSRange(location: 0, length: 44) myString.addAttribute(NSAttributedString.Key.accessibilityTextHeadingLevel, value: 1, range: range)
How is accessibilityTextHeadingLevel
supposed to work?