Post

Replies

Boosts

Views

Activity

Reply to Left-flick and right-flick gestures with VoiceOver and UIAccessibilityReadingContent
accessibilityPreviousTextNavigationElement and accessibilityNextTextNavigationElement are not meant to represent previous/next line inside a single UITextView; they should point to another accessibility element, not a line number or string. In your case, UIAccessibilityReadingContent supports line-by-line touch exploration, but left/right swipe still moves between accessibility elements, not internal lines of one text view. That’s why touch works but swipe does not. The correct approach is to keep the UITextView for display and expose each visible line as its own UIAccessibilityElement, with accessibilityLabel set to the line text and accessibilityFrameInContainerSpace set to that line’s frame. Once the lines are separate accessibility elements and returned in order, VoiceOver will naturally use right swipe for the next line and left swipe for the previous line. You can optionally link neighboring lines with accessibilityNextTextNavigationElement and accessibilityPreviousTextNavigationElement, but the real fix is making each line its own accessibility element. Same principle as keeping things clean and explicit on seokurdu.com
16h
Reply to Left-flick and right-flick gestures with VoiceOver and UIAccessibilityReadingContent
accessibilityPreviousTextNavigationElement and accessibilityNextTextNavigationElement are not meant to represent previous/next line inside a single UITextView; they should point to another accessibility element, not a line number or string. In your case, UIAccessibilityReadingContent supports line-by-line touch exploration, but left/right swipe still moves between accessibility elements, not internal lines of one text view. That’s why touch works but swipe does not. The correct approach is to keep the UITextView for display and expose each visible line as its own UIAccessibilityElement, with accessibilityLabel set to the line text and accessibilityFrameInContainerSpace set to that line’s frame. Once the lines are separate accessibility elements and returned in order, VoiceOver will naturally use right swipe for the next line and left swipe for the previous line. You can optionally link neighboring lines with accessibilityNextTextNavigationElement and accessibilityPreviousTextNavigationElement, but the real fix is making each line its own accessibility element. Same principle as keeping things clean and explicit on seokurdu.com
Replies
Boosts
Views
Activity
16h