Making children of StaticText accessible
Making children of StaticText accessible
- Subject: Making children of StaticText accessible
- From: Christiaan Hofman <email@hidden>
- Date: Mon, 21 Apr 2008 15:15:53 +0200
Hi list,
I'm pretty much a newbie to accessibility, though certainly not to Obj-
C and Cocoa. I have read all the docs I could find about
accessibility, looked at several Apple samples, and I've already
successfully added accessibility to some non-trivial custom controls
(including a control with simulated accessible subelements). However
I'm now getting stuck in the next step to improve accessibility to my
app.
I have a custom view that advertises a StaticText role, for which I
want to make subelement of the text accessible, such as links in the
text. I have added some custom proxy objects for these subelements and
have overridden -accessibilityAttributeNames, -
accessibilityAttributeValue:, -accessibilityHitTest:, and -
accessibilityFocusedUIElement for the view to add these proxy objects
as children. Now Accessibility Inspector seems to properly identify
the subelements and get their attributes. However in practice it does
not seem to work. In particular, the hit testing of assisting devices
such as Voice Over is not able to find the subelements, it only finds
the view. E.g. when I choose the voice over cursor to follow the mouse
cursor, and hover over the subelement it will select (and speak) the
full view, not the subelement.
I've figured out that this is probably due to the fact that the view
has role StaticText, as this is not expected to have children. So they
are silently ignored by assistive devices. the focus works as expected
when I change the role to Group. Of course that's not a solution,
because I want to expose the text and all its (parametrized) properties.
An obstacle is that the whole view is a black box to me (even its
class is private). In particular, I don't know what the original
implementation of accessibility protocol for the view does. So I
cannot simply move the functionality to some other (proxy child)
element.
Does anyone have an idea how I could solve this problem?
Thanks,
Christiaan
_______________________________________________
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