My problem is to setup an order that crosses child view containers. Let's draft a simplified view hierarchy:
InnerContainer
TableView
I'd like to achieve this: when Button1 is selected and the user swipes to the right, the first row of TableView should be selected. Currently, I just get the "at the end" VO tone.
When I implement UIAccessibilityContainerProtocol in ContainerView with just Button1, the TableView is cut off from VO.
So I tried to add the TableView like this:
- (NSInteger)accessibilityElementCount {
return 1 + bottomContainerView.accessibilityElementCount;
- (id)accessibilityElementAtIndex:(NSInteger)index {
switch (index) {
case 0:
return button1;
default:
return [bottomContainerView accessibilityElementAtIndex:index - 1];
}
}
- (NSInteger)indexOfAccessibilityElement:(id)element {
if (element == button1) {
return 0;
} else {
return [bottomContainerView indexOfAccessibilityElement:element] + 1;
}
}
But this fails because bottomContainerView.accessibilityElementCount returns NSIntegerMax. I assume that's because BottomContainerView is not an accessibility container itself and only recursively gets to the accessibility container of TableView.
Ortwin
Am 09.09.2014 um 20:50 schrieb Chris Fleizach <
email@hidden>:
Marco is correct.
In iOS7 and earlier you can override the UIAccessibilityContainerProtocol
On Sep 9, 2014, at 9:43 AM, Marco Zehe <
email@hidden> wrote:
Shouldn't you be able to do this with some properly arranged
UIAccessibilityContainers with UIAccessibility objects in the order
you want? I've seen this in one of the WWDC iOS Accessibility
videos, this year or last, don't recall.
Marco
Am 09.09.2014 um 18:39 schrieb Ortwin
Gentz:
So that's the part to shift the VO focus to a particular element, right?
But how can I "insert" any element into the sequential list of elements the user can step through using the horizontal swipe gestures?
Or do I have to roll my own GestureRecognizer overriding the VO gestures?
On 09.09.2014, at 17:53, Chris Fleizach <email@hidden> wrote:
You should be able to do
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, <element you want to move to>);
On Sep 9, 2014, at 1:42 AM, Ortwin Gentz <email@hidden> wrote:
In our Where To? app we have a complex view hierarchy with multiple view controllers that are presented simultaneously. Here's the view controller parent-child hierarchy of a particular screen:
UINavigationC
UIVC (upper part of the screen)
UIPageVC (lower part of the screen)
"PaneVC" (includes a UISegmentedControl acting similarly to a UITabVC)
UITableVC
Is it possible to support the left/right swipe gesture to switch between accessibility elements across view controllers?
In my example, if the UISegmentedControl in PaneVC is selected, I would like to switch to a button in UIVC when the user left swipes.
Thanks for any hints,
Ortwin _______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden