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: Eric Schlegel <email@hidden>
- Date: Wed, 30 Sep 2009 16:22:48 -0700
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