0

I am implementing VoiceOver accessibility in my iOS App pikSpeak which helps blind people to locate iOS different buttons on the screen.

When I open a new ViewController the first button that Siri announces is the one on the top-left-most corner. However, that is not the primary button that I want the users to hear when they open a new ViewController as it is generally the back button. Rather I want it to be the page heading button.

How do I change the primary accessibility to a UILabel?

TylerH
  • 20,799
  • 66
  • 75
  • 101
rahulg
  • 2,183
  • 3
  • 33
  • 47
  • 1
    While brittle, it's sometimes helpful to introduce a slight delay between the view load and your screen changed notification. – Justin Apr 15 '14 at 15:24

1 Answers1

0

Migrating solution from comments by David Rönnqvist to an answer:

Depending on the exact problem you can either put the focus on that element when the view appears or you can manually reorder all of the elements.

To change the focus to a UILabel programmatically:

UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, yourLabel);

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
TylerH
  • 20,799
  • 66
  • 75
  • 101
  • Reposting a [comment by OP](https://stackoverflow.com/questions/23060291/how-do-i-change-the-primary-accessibility-element-in-a-new-viewcontroller#comment35245259_23060291) under the question: *@DavidRönnqvist Thanks for the perfect answer, I looked up the Apple Docs and found out that tis the exact way to resolve the issue, but due to some reasons, I am unable to get that result. When I open a ViewController the first time the Top-Left element is selected :-( . But when I pop to the same VC, it works as expected. Any suggestions?* – TylerH Mar 08 '22 at 17:11