Re: UIAccessibilityContainer Question
Re: UIAccessibilityContainer Question
- Subject: Re: UIAccessibilityContainer Question
- From: Doug Russell <email@hidden>
- Date: Wed, 30 May 2012 15:40:27 -0700
Makes sense. Thanks.
On May 30, 2012, at 3:36 PM, Chris Fleizach wrote:
>
>
> On May 30, 2012, at 3:32 PM, Jake Carter wrote:
>
>> My assumption would be you could have an UIAccessibilityElement with isAccessibilityElement = NO (which is kinda funny if you ask me).
>>
>
> Correct. Again, this might be necessary if you have a hierarchy that mimics a view hierarchy, but does all it's own drawing (for example based on CALayers)
>
>> Jake
>>
>> On May 30, 2012, at 3:29 PM, Doug Russell wrote:
>>
>>> I thought UIAccessibilityContainers are not themselves supposed to be accessibility elements? When I return isAccessibilityElement as yes on a container, in my experience, I can't then select any of the elements I return as container elements.
>>>
>>> On May 30, 2012, at 3:25 PM, Chris Fleizach wrote:
>>>
>>>> It's on NSObject so that you can implement UIAccessibilityContainer on a UIAccessibilityElement if necessary, or if you have a separate drawing-based hierarchy that is not based on UIViews.
>>>>
>>>> On May 30, 2012, at 3:22 PM, Doug Russell wrote:
>>>>
>>>>> To be fair the protocol reference does call it out:
>>>>>
>>>>> "The UIAccessibilityContainer informal protocol provides a way for UIView"
>>>>>
>>>>> but ya, it would probably be less confusing if it was a formal protocol adopted by UIView.
>>>>>
>>>>> File a radar and I'll dupe it :)
>>>>>
>>>>> On May 30, 2012, at 3:15 PM, Jake Carter wrote:
>>>>>
>>>>>> Yeah, the UIAccessibilityElement stuff makes sense to me, but the UIAccessibilityContainment stuff seems like it needs to be on a UIView (or something in the view hierarchy) so having the category on NSObject is just a little confusing. That's all.
>>>>>>
>>>>>> Jake
>>>>>>
>>>>>> On May 30, 2012, at 3:13 PM, Doug Russell wrote:
>>>>>>
>>>>>>> They're on NSObject so you can do things like set an accessibilityLabel on a UIImage that's going into a UISegmentedControl
>>>>>>>
>>>>>>> On May 30, 2012, at 3:12 PM, Jake Carter wrote:
>>>>>>>
>>>>>>>> Yeah, this is the conclusion I was coming to also. Seems odd that the methods are on NSObject instead of something like UIView or UIResponder. (Maybe just to have one place for both Cocoa as well as CocoaTouch...?)
>>>>>>>>
>>>>>>>> I think I'll try the delegate passthrough idea.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Jake
>>>>>>>>
>>>>>>>> On May 30, 2012, at 2:58 PM, Doug Russell wrote:
>>>>>>>>
>>>>>>>>> The view subclass would be the place to implement them.
>>>>>>>>>
>>>>>>>>> An option, if you're going to setup a delegate anyway, is to forward
>>>>>>>>> them through the delegate to your view controller.
>>>>>>>>>
>>>>>>>>> I do that a lot when working with -accessibilityScroll.
>>>>>>>>>
>>>>>>>>> Sent from my Pocket Internet Machine
>>>>>>>>>
>>>>>>>>> On May 30, 2012, at 2:50 PM, Jake Carter <email@hidden> wrote:
>>>>>>>>>
>>>>>>>>>> Hello everyone,
>>>>>>>>>>
>>>>>>>>>> I'm trying to rework some things in some code I'm working on and need to provide my own UIAccessibilityElements via the UIAccessibilityContainer category. I'm trying to understand where we need to implement these methods. The UIAccessibilityContainer category methods are on NSObject which would lead me to believe that they would be called for any object (I was hoping to put them in a view controller where I had access to both my views and model objects) but this doesn't seem to be true. It seems that they are only called on objects in the view hierarchy. It seems like I need to put them in my subclass for UIView and I guess setup some sort of delegation where my view subclass can call out to the view controller to access the model objects to create the UIAccessibilityElements from. Does this seem like a decent workaround or am I missing something?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> Jake
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> 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