VoiceOver accessibility issue in UIKit for line granularity

Context: We are using UIKit to provide accessibility in our app for our iOS users. Our app majorly contains documents/books that user can read.

Issue: The issue is VoiceOver is skipping the lines given to it when there are some leading spaces in it. We have observed this issue in different languages. This is only happening for line granularity, other granularities seems to be working as expected.

Implementation: We are using below API's to provide line content to voice over.

UIAccessibilityReadingContent
        - accessibilityPageContent
        - accessibilityFrameForLineNumber
        - accessibilityContentForLineNumber

We are creating UIAccessibilityElement objects to pass to VoiceOver and each UIAccessibilityElement implements UIAccessibilityReadingContent to provide readable content.

We also use below APIs to cross element boundaries for all granular navigations.

accessibilityNextTextNavigationElement
accessibilityPreviousTextNavigationElement

We want to know whether skipping the line when provided with leading spaces is expected or a bug in UIKit.

Thanks for the info! This seems like a bug. Please file a bug report using the Feedback Assistant tool. It will help guide you to fill out enough information for the team to investigate. Any code samples, a screen recording, etc will help a lot!

https://developer.apple.com/bug-reporting/

After you create your report, feel free to reply here with the Feedback ID!

VoiceOver accessibility issue in UIKit for line granularity
 
 
Q