简体   繁体   中英

VoiceOver accessibility focus on a series of elements

Say I have a dialog box like this:

对话框

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM