After adding support for accessibilityAttributedStringForRange: in my text editing application, I’m observing some weird behavior where VoiceOver reads font information after moving the selection using just the arrow keys (as opposed to
the VO+arrow key shortcuts).
Line 1 of my text has Font A applied, and line 2 (which is really another paragraph created using the return key) has Font B applied. With selection at the beginning of line 1, I hit the down arrow key (*not* VO-down arrow) and VoiceOver
reads the text on that line. Then shortly after (maybe about 1s), it reads the name of Font B, which I’m not expecting. I have all the default VO preferences set, specifically that it does nothing when selection moves to content with different font/attributes/etc.
Based on some debugging, I see something asking for the accessibilityAttributedStringForRange: of the end of line 1 after giving all the information for line 2, but it’s not clear to me why that’s happening. My app has special text input,
and so when the selection changes I post NSAccessibilityValueChangedNotification and NSAccessibilitySelectedTextChangedNotification in order to get VoiceOver to properly read content.
Is it possible there’s a bug in VoiceOver here? Users are complaining about this behavior but I have no idea what my application might be doing to cause VoiceOver to behave like this…