Re: Add accessibility for custom controls in a standard Carbon window
Re: Add accessibility for custom controls in a standard Carbon window
- Subject: Re: Add accessibility for custom controls in a standard Carbon window
- From: Xiang Cao <email@hidden>
- Date: Thu, 01 Oct 2009 17:15:57 -0700
- Thread-topic: Add accessibility for custom controls in a standard Carbon window
Thanks. That works great. I have another quick question. When they are
asking for attributes values, how should I return the value?
I tried to use this to respond a role attribute, but it does not work. The
verifier says it cannot find the role.
Return ::SetEventParameter(iEvent, kEventParamAccessibleAttributeValue,
typeCFStringRef, sizeof(CFStringRef), kAXButtonRole);
Is the type correct? I wonder where can I find the correct CF Types to
respond for each attribute. For example, what kind of data should I pass in
responding of position and size query?
Thanks.
On 9/30/09 4:22 PM, "Eric Schlegel" <email@hidden> wrote:
>
> On Sep 30, 2009, at 3:58 PM, Xiang Cao wrote:
>
>> Hi all,
>>
>> I have a Carbon window which contains some standard controls and
>> some custom controls. All the standard ones such as buttons, tab and
>> check boxes work with Voice over automatically. This is great. But
>> all the custom controls (for example, we have a custom drop box)
>> cannot be identified by Voice Over.
>>
>> The plan I was think to make this work is to add additional event
>> handler in the carbon window for kEventAccessibleGetNamedAttribute
>> event. When the assistive application asks for children, I will
>> create accessibility objects for the custom controls and then add
>> them to the children list. But I have to ask the default event
>> handler for the standard children first and then add the custom
>> children to that array. I¹m not very familiar with carbon so I want
>> to ask what is correct the way to ask any default accessibility
>> parameter value. I know I just have to call super in Cocoa. But not
>> sure about Carbon.
>
> HI Xiang,
>
> You probably want to use CallNextEventHandler from within your
> kEventAccessibleGetNamedAttribute handler. That will call through to
> any other handlers for that event (such as the default handler
> provided by HIToolbox). The default handler will create a CFArray of
> the known children of the window and add it to the event as the
> content of the kEventParamAccessibleAttributeValue parameter, so after
> CallNextEventHandler returns, you can use GetEventParameter to get
> that array, and append your own accessible objects.
>
> -eric
>
_______________________________________________
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