0

Say I have a dialog box like this:

dialog box

and I want to focus on title, then body and then each button one after another. I am able to focus on body using

UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, dialog.bodyLabel);

but is there any way to define a set of elements we want to focus instead of a single one?

EDIT:

I have also tried to make a list of elements I want to focus on using this syntax:

dialog.accessibilityElements = @[dialog.titleLable, dialog.bodyLable, etc];

but it just reads the first element (in this case dialog.titleLable) and doesn't move to the next one. Any thoughts?

Yar
  • 7,020
  • 11
  • 49
  • 69

1 Answers1

0

The default value is set to NO for all the elements.

set the isAccessibleElement to YES for the all individual elements in the dialog

and then you can do

dialog.accessibilityElements = @[dialog.titleLable, dialog.bodyLable]; 

so that voice over reads title label first and body label next.

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109