UITextView Linkable label Accessibility Voice Over Issue

Related searches

I have a UITextView and portion of the text is clickable. Link works. When I turn the accessibility feature in settings of the iPhone and turn on Voice over as well, the text of the textview is read out but the link is not working. The accessibility feature on storyboard of the textview is enabled and also link is selected under accessibility attributes and the link does not work when voice over is turned on. I have also tried adding isAccessbilityElement = true to the textview and ended up with no luck.

UITextView is added to the custom cell on a table view.

Thanks in advance for your suggestions.

The problem deals with a specific VoiceOver gesture to be used when a link must be activated in a UITextView.

I created a blank project including the code snippet hereafter to get 2 URLs in the myTextView element :

class TextViewURLViewController: UIViewController, UITextViewDelegate {

    @IBOutlet weak var myTextView: UITextView!

    let myString = "Follow this developers guide if you already know the VoiceOver gestures."
    let myDevURL = "https://a11y-guidelines.orange.com/mobile_EN/dev-ios.html"
    let myGesturesURL = "https://a11y-guidelines.orange.com/mobile_EN/voiceover.html"


    override func viewDidLoad() {

        let attributedString = NSMutableAttributedString(string: myString)

        attributedString.addAttribute(.link,
                                      value: myDevURL,
                                      range: NSRange(location: 12,
                                                     length: 17))

        attributedString.addAttribute(.link,
                                      value: myGesturesURL,
                                      range: NSRange(location: 52,
                                                     length: 19))

        myTextView.attributedText = attributedString
        myTextView.font = UIFont(name: myTextView.font!.fontName,
                                 size: 25.0)
    }


    func textView(_ textView: UITextView,
                  shouldInteractWith URL: URL,
                  in characterRange: NSRange,
                  interaction: UITextItemInteraction) -> Bool {

        UIApplication.shared.open(URL, options: [:])
        return false
    }
}

Follow the steps hereunder to activate the link :

  1. Get the rotor links item with the appropriate gesture.
  2. Swipe up or down with one finger to reach the link.
  3. Double tap and hold until you see the screen on step 4.

  1. A kind of popup shows up above the link.
  2. Once the action sheet appears, flick right to get the Open action.
  3. Double tap to open the URL and get the last screen on step 7.

The only thing to remember is the double tap and hold until the popup appears above your link.

UITextView Linkable label Accessibility Voice Over Issue, When I turn the accessibility feature in settings of the iPhone and turn on Voice over as well, the text of the textview is read out but the link is not working. When the <label> element is used to explicitly associate form controls and their descriptions, VoiceOver will read the appropriate label when that form element is navigated to. If a form control has a visual label that is not associated using the <label> element, VoiceOver will not auto-associate the label to the form control based on proximity.

I do not have solution. I still looking for.

For now I use UIWebview in my app instead of UITextView. UIWebview is more efficient with UIAccessiblity.

Re: Creating Accessibility Elements for Links in UITextView, However, VoiceOver does not recognize the links as being separate accessibility The other elements are frames for each link within the attributedText. > And the accessibility container for each element is the label itself? However, when I attempt create accessibility elements I run into some problems. To receive the latest developer news, visit and subscribe to our News and Updates.

You have to override default behaviour to select either UITextViews test or link you have provided. See this class UIAccessibilityElement. Hope this helps you

Creating Accessibility Elements for Links in UITextView - Apple, Creating Accessibility Elements for Links in UITextView Links must be detected - Each link must be recognized as a VoiceOver element - Each However, when I attempt create accessibility elements I run into some problems. (So in a few with 5 labels laid out top to bottom, VoiceOver does not see any� A content label sometimes depends on information only available at runtime, or the meaning of a View might change over time. For example, a Play button might change to a Pause button during music playback. In these cases, use View#setContentDescription(CharSequence contentDescription) to update the content label at the appropriate time.

Support links inside UITextView attributed strings � Issue #506 , Accessibility Explorer list the links as child elements, and XCUITest /xctest-how -to-tap-on-url-link-inside-uitextview/46530038#46530038� Move accessibility focus to the empty editable item. Listen to TalkBack's spoken description of the empty editable item. Check whether the description contains a label, and whether that descriptive label matches any visual labels in the app. Type some text in the editable item. Move accessibility focus to the editable item.

[TextFields] Include label text in accessibilityLabel when textfield has , Overview In the TextFields examples, when VoiceOver reads an empty text field, it reads-out romoore opened this issue on Jan 9, 2018 � 11 comments [ TextFields] Textfield's accessibility labels or value should include Please link to it. Overview. UIText View supports the display of text using custom style information and also supports text editing. You typically use a text view to display multiple lines of text, such as when displaying the body of a large text document.

When adding an accessibilityLabel to a view, on iOS that accessibility label is not reaching the function that is handling the label. We have discovered this issue while importing a .ipa into Appium Inspector which is an automation testing tool.

Comments
  • Do you mean the traits of this textview is Link and you want to voice out but nothing?
  • When Voice Over accessibility is turned on the action on the link was not working. The entire text is read out but the portion of the text which is a link did not work in the sense the action on the link was not working. I added Tap gesture when VoiceOver is enabled and the link works now.
  • Solution found here stackoverflow.com/questions/39355749/…
  • @SruE that is not a solution to this question. This involved a UITextView. That answer is about a UILabel
  • @SruE: did my answer provide enough information to find out an appropriate solution for your question? 😉
  • This answer shouldn't be downvoted. If you have to deal with those accessibility stuff, and you are asked by business people for those requirements of which user experience is solely based on web experience, this actually the good approach. Seriously, why people would like to implement those web-like hyperlink in native ways?