• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Customize the previous/next order of accessibility elements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customize the previous/next order of accessibility elements


  • Subject: Re: Customize the previous/next order of accessibility elements
  • From: Chris Fleizach <email@hidden>
  • Date: Wed, 10 Sep 2014 09:10:11 -0700

Overriding 
ContainerView

to return two elements using UIAccessibilityContainer protocol  (button and table) would be next suggestion

On Sep 10, 2014, at 9:07 AM, Ortwin Gentz <email@hidden> wrote:

Tried that (even with y = 200) and unfortunately it doesn't change the order. Is there a way to override the order?

Am 10.09.2014 um 17:56 schrieb Chris Fleizach <email@hidden>:

My guess looking at this is that the tableview and scroll view get sorted before the button because they all have origin y=0

It’s possible if you overrode the accessibilityFrame of the scrollView to have a y=10 let’s say, then that might cause button1 to be sorted first

On Sep 10, 2014, at 8:54 AM, Ortwin Gentz <email@hidden> wrote:

I've put together a sample project:

https://www.dropbox.com/s/xrjhcd981z1fn9z/VOSample.zip?dl=0

I think part of the problem is that my "Button 1" container is on top of a scroll view.

Button 1 is last in my VO tab order but I want it to be first.

Is this solvable by implementing UIAccessibilityContainerProtocol? Note that the content of ScrollView is dynamic and might be complex. So I don't want to hardcode all its accessibility elements in the root view.

Ortwin




Am 10.09.2014 um 13:56 schrieb Ortwin Gentz <email@hidden>:

My problem is to setup an order that crosses child view containers. Let's draft a simplified view hierarchy:

ContainerView
  TopContainerView
    Button1
  BottomContainerView
    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

https://developer.apple.com/library/ios/documentation/uikit/reference/UIAccessibilityContainer_Protocol/Introduction/Introduction.html

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
References: 
 >Re: Customize the previous/next order of accessibility elements (From: Chris Fleizach <email@hidden>)
 >Re: Customize the previous/next order of accessibility elements (From: Marco Zehe <email@hidden>)
 >Re: Customize the previous/next order of accessibility elements (From: Chris Fleizach <email@hidden>)
 >Re: Customize the previous/next order of accessibility elements (From: Chris Fleizach <email@hidden>)

  • Prev by Date: Re: Customize the previous/next order of accessibility elements
  • Next by Date: Updating accessibilityLabel does not trigger refresh of braille displays
  • Previous by thread: Re: Customize the previous/next order of accessibility elements
  • Next by thread: Updating accessibilityLabel does not trigger refresh of braille displays
  • Index(es):
    • Date
    • Thread