您想要将您的加载覆盖屏幕设置为模态视图。 Modal意味着视图背后的事物不可操作(或VoiceOver可以聚焦)。
//Instantiate a view controller with your loading spinner.
_modalDialogViewController = [[UIStoryboard storyboardWithName:@"ModalDialog" bundle:[NSBundle mainBundle]]
instantiateViewControllerWithIdentifier:@"AccessibleSpinnerModal"];
//Make this view controller modal, meaning only things on this screen will be actionable/focusable.
_modalDialogViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;
您也可能会需要在这两种风格来使用辅助的通知。
//Announce that content is loading directly
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, "Stuff is laoding");
或者
//Shift focus to the view in your modal that is sharing the status of the loading content.
UIAccessibilityPostNotification(UIAccessibilityLayoutChanged, spinnerView);
这将导致焦点移动到该视图。
目前尚不清楚问题所在。 VoiceOVer焦点控制或ViewController加载时发生的情况。绝对不应该隐藏VoiceOver中的可见视图。在那里有一张桌子并且它是空的这一事实很重要。这就是说,也许这不应该被ViewController加载的第二个共享,并且存在动态内容问题。你最初可能可以做一些更明智的事情......但由于你的解释,你很难理解你的布局和实际问题......图片??? – ChrisCM
嗯,它只是一个全屏UITableView的空ViewController。在加载时有一个空列表没有意义,因为它是控制器中的唯一视图,并且我们在应用程序中随处可见特定的加载声音。 据我所知,VoiceOver描述了屏幕上显示的内容,但是在加载时有一个空列表并不十分相关,并且污染了体验。 – natinusala
如果在那里有一个列表,它应该是可访问的。如果它不相关,为什么它甚至在屏幕上开始?如果你想“不污染体验”,那么直到有数据时,才把它从每个人都隐藏起来。想知道什么是污染的体验?有视力障碍的用户在视图控制器上“看到”一个视图,想要更多关于它的信息,在视图上运行他们的手指,期望得到有用的反馈,但是有一些善意的(但最终是无知的)开发者隐藏了VoiceOver的视图。这是一种被污染的经历。 – ChrisCM