您想要將您的加載覆蓋屏幕設置爲模態視圖。 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