Re: Making children of StaticText accessible
Re: Making children of StaticText accessible
- Subject: Re: Making children of StaticText accessible
- From: Christiaan Hofman <email@hidden>
- Date: Mon, 21 Apr 2008 20:01:42 +0200
On 21 Apr 2008, at 7:28 PM, Mike Engber wrote:
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.
Is your custom view is a subclass of NSTextView?
No, it's a direct subclass of NSView. The only thing I know about it
is the class name and that it implements NSAccessibility. If it were,
I wouldn't have to ask my question.
The standard NSTextView already supports exposing links and
attachments as children. I think this went in for Tiger.
You can read in the regular Cocoa documentation about links (read up
on attributed strings, specifically look at the attribute
NSLinkAttributeName).
As for other kinds of children, read up about text attachments.
Using custom attachment cells to represent your children is where
I'd start.
I can't control the actual data or view model, that's a given. I only
want to make it more accessible, using proxy objects to make the
children accessible (like in the ImageMap sample).
If you can go the route I'm outlining, then it shouldn't be end up
being too much work.
On the other hand, if your custom view is a not a subclass of
NSTextView then you have a HUGE task in front of you. Text has one
of the more sophisticated accessibility implementations. Note -
there are all those parameterized attributes that give of font/style
info.
-ME
I'm not asking about *implementing* the children, I already have that
part working. And it's not too much work, as I'm not too much
interested in these more sophisticated text properties. I am already
happy to make the most basic attributes for the links accessible (like
the target, link text, location), so users will be able to select and
follow links using VoiceOver.
The problem is that VoiceOver simply ignores any children I return,
because the view's role is StaticText, and that usually has no
children (so apparently VoiceOver and perhaps other assistive devices
assume it *never* has children).
As for the main text, it already implements full support for the
(parametrized) attributes for StaticText. This is also the reason why
I cannot change the role to Group, because I really don't want to
reimplement this (as this is a huge task, as you say).
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