Re: Lightweight accessibility?
Re: Lightweight accessibility?
- Subject: Re: Lightweight accessibility?
- From: James Dempsey <email@hidden>
- Date: Tue, 4 Dec 2007 22:29:54 -0500
On Dec 1, 2007, at 5:52 AM, Uli Kusterer wrote: 1. You have an internal object model for the various objects that draw themselves.
In this case, you can use the Dicey sample source code on ADC to show how you would make objects that know their own info (value, position, size), and have the outer view report them as children.
What happens if some of these objects go away? Will they have to be CFTypes or something so an outer script doesn't refer to an object that's already gone away?
2. You have one big view which does all of the drawing
In this case, you do need to create a custom 'FauxUIElement' object with the appropriate information.
The food pyramid example is the "ImageMap" example, which has an already implemented FauxUIElement superclass you can grab. (Please use the superclass - the -hash and -isEqual function is important to get correct, and that sample class does the right thing already).
Once you have the structure reporting correctly, if the user can navigate around using the keyboard, you will want to use the function NSAccessibilityPostNotification() to send the NSAccessibilityFocusedUIElementChangedNotification when the focus changes from element to element.
I saw that code, but it uses NSView. Is there an HIView version? Or even better, is there a way to do this that can work with an HIView now, but won't be too troublesome to port to work in an NSOpenGLView eventually?
The Carbon version of the ImageMap example is at:
I can't think of a very good way to implement the custom Carbon accessibility, and have it translate easily to Cocoa. Each goes about the implementation differently (Handling Carbon Events on one hand messaging Obj-C objects on the other). You might investigate adding an HICocoaView (new in Leopard) to the top level HIView - add an NSView to it and subclass that to provide your FauxUIElements. Your faux ui element Obj-C would need to reference the state of your UI to return the correct values. Depending on how much of the underlying OpenGL code changes in the port - you may be able to reuse most or all of the accessibility structure.
The Carbon Accessibility guide is at:
-James
-------------------------------------------------- James Dempsey AppKit Engineering Apple
|
_______________________________________________
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