Help with MS Accessibility

P

Pete Davis

First of all, I apologize for cross-posting to so many groups, but clearly
there are only 2 people on the planet that understand MS Accessibility in
..NET and I'm hoping I might reach just one of them by cross posting to 6
groups because I've already posted to 4 others with no luck.

Our company has a number of custom controls that we're building for a suite
of applications. We're trying to add accessibility support to the controls
and we're finding the documentation very lacking. It's ambiguous, vague, and
very incomplete. There are almost no online resources for it and the few
samples we've found have been far too trivial to be of any real-life use.

Surely we're not breaking virgin ground here. Surely somebody has cut their
teeth on this stuff already. Yet I can't find anyone. I've e-mailed people
at MS, some of whom have said they'll try to find someone to help us, but
nothing yet. I've scoured the web. I've scoured the MSDN (DVD and web site).

Has anyone dealt with this, and if so, can you please, please, please,
e-mail me or tell me which newsgroup I can communicate with you on?

Here's a sample question:

We have a grid control. The children of the Grid ControlAccessibleObject are
AccessibleObjects that are Rows and Columns. The rows have children that are
AccessibleObjects that are cells.

When the control calls AccessibilityNotifyClients to notify of an event
(selection, focus change, etc), the second parameter is: int childID. The
documenation states that childID is: 'The child "Control" to notify of the
accessible event.'

Okay, I put "Control" in quotes because in the docs there's a link to the
Control class. If the parameter is an int, how does this represent a Control
class? Aren't the children the AccessibleObjects and
ControlAccessibleObjects?

Where does childID come from? I can't find any sort of int ID for any class
or interface involved in accessibility.

I thought maybe childID was the index into the GetChild() method, but that
can't be right because what about the situation in my grid? Suppose I want
to notify a cell? But the cell isn't a child of the grid accessible object,
it's a child of the row accessible object. So the indexes into GetChild()
overlap all over the place. They're far from unique, so that can't be it.

Anyway, this is one of a number of questions we have. Please, if anyone
knows anything about this stuff, please get in touch.

Thanks.

Pete
 
M

Michael \(michka\) Kaplan [MS]

I don't know how much .NET experience she has, but Sara Ford
(http://blogs.msdn.com/SaraFord) has forgotten more about accessibility than
most people will ever know. So if anyone knows, she does!


--
MichKa [MS]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Microsoft Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.
 
P

Pete Davis

Thank you so much. Her page also has a lot of good links. Most of which I've
already arrived at by way of google, but I would have found them all much
faster if I had hit her page first.

I'm trying to contact her. She definitely seems like the right person to
help us.

Pete

Michael (michka) Kaplan said:
I don't know how much .NET experience she has, but Sara Ford
(http://blogs.msdn.com/SaraFord) has forgotten more about accessibility than
most people will ever know. So if anyone knows, she does!


--
MichKa [MS]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Microsoft Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.




Pete Davis said:
First of all, I apologize for cross-posting to so many groups, but clearly
there are only 2 people on the planet that understand MS Accessibility in
.NET and I'm hoping I might reach just one of them by cross posting to 6
groups because I've already posted to 4 others with no luck.

Our company has a number of custom controls that we're building for a suite
of applications. We're trying to add accessibility support to the controls
and we're finding the documentation very lacking. It's ambiguous, vague, and
very incomplete. There are almost no online resources for it and the few
samples we've found have been far too trivial to be of any real-life use.

Surely we're not breaking virgin ground here. Surely somebody has cut their
teeth on this stuff already. Yet I can't find anyone. I've e-mailed people
at MS, some of whom have said they'll try to find someone to help us, but
nothing yet. I've scoured the web. I've scoured the MSDN (DVD and web site).

Has anyone dealt with this, and if so, can you please, please, please,
e-mail me or tell me which newsgroup I can communicate with you on?

Here's a sample question:

We have a grid control. The children of the Grid ControlAccessibleObject are
AccessibleObjects that are Rows and Columns. The rows have children that are
AccessibleObjects that are cells.

When the control calls AccessibilityNotifyClients to notify of an event
(selection, focus change, etc), the second parameter is: int childID. The
documenation states that childID is: 'The child "Control" to notify of the
accessible event.'

Okay, I put "Control" in quotes because in the docs there's a link to the
Control class. If the parameter is an int, how does this represent a Control
class? Aren't the children the AccessibleObjects and
ControlAccessibleObjects?

Where does childID come from? I can't find any sort of int ID for any class
or interface involved in accessibility.

I thought maybe childID was the index into the GetChild() method, but that
can't be right because what about the situation in my grid? Suppose I want
to notify a cell? But the cell isn't a child of the grid accessible object,
it's a child of the row accessible object. So the indexes into GetChild()
overlap all over the place. They're far from unique, so that can't be it.

Anyway, this is one of a number of questions we have. Please, if anyone
knows anything about this stuff, please get in touch.

Thanks.

Pete
 
C

Charles Oppermann

Thank you so much. Her page also has a lot of good links. Most of which
I've
already arrived at by way of google, but I would have found them all much
faster if I had hit her page first.

I'm trying to contact her. She definitely seems like the right person to
help us.

It's my understanding that she no longer does accessibility testing, but I'm
not certain of that.

To help with the basics of the Accessibility support in the .NET Framework,
spend some time reading the Active Accessibility documentation on MSDN.
That'll give you a background and introduce you to the concepts.

The child ID concept is explained at:
http://msdn.microsoft.com/library/en-us/msaa/msaaovrw_36gj.asp

Although reading it now, it's no more helpful than the first version of that
topic written in 1997.

Basically the child ID is a number of a sub-object that doesn't have full
accessibility support. It appears in your case that each cell has full
support, thus you can return CHILDID_SELF (0x00).

Hope this helps.
-Charles Oppermann
 
P

Pete Davis

Thanks, that was very helpful. The .NET documentation on it doesn't really
make a lot of sense, so we've been going back and reading COM-based
documentation, as it has given us a lot more information and clearly we
missed this. Thanks.

It still seems we'll need to implement the child IDs for the
AccessibilityNotifyClients call, though. How else can we specify which
objects should be notified of changes?

I think part of our confusion was looking at the IAccessibility interface in
ObjectBrowser where get_accChild returns an object. So we were thinking it
was an object implementing IAccessible, but clearly it's an int32.

Thanks again.

Pete
 
P

Pete Davis

Oops, I misread the docs. You can disregard a lot of what I wrote. It's
clear now, though. Thanks again.
 
P

Pete Davis

Okay, if the ChildIDs are to be used for simple elements, (and I'm not using
simple elements) then how do I send a notification regarding a grandchild of
my control, though?

From the control itself, I need to call AccessibilityNotifyClients() if, for
example, a cell in my grid is selected. But if I pass CHILDID_SELF (which
actually, I haven't tracked down if there's an equivalent in .NET yet, I may
have to pull the value of an SDK header file), how does it know that the
notification is regarding a cell and not the grid itself? I assume this
matters.

Pete
 
C

Charles Oppermann

Okay, if the ChildIDs are to be used for simple elements, (and I'm not
using
simple elements) then how do I send a notification regarding a grandchild
of
my control, though?

If you're not using simple elements, then each child is it's own object and
can generate events on it's own.
From the control itself, I need to call AccessibilityNotifyClients() if,
for
example, a cell in my grid is selected. But if I pass CHILDID_SELF (which
actually, I haven't tracked down if there's an equivalent in .NET yet, I
may
have to pull the value of an SDK header file), how does it know that the
notification is regarding a cell and not the grid itself? I assume this
matters.

CHILDID_SELF is zero (0x00).

If each cell is it's own object, then you should be able to reference the
actual child *object* and use it's ID property. The .NET Framework
reference shows this in the samples.

Feel free to e-mail me off-line at charles at coppersoftware dot com.
 
P

Pete Davis

Okay, but where does the ID come from is my question.

You say:

"If each cell is it's own object, then you should be able to reference the
actual child *object* and use it's ID property."

Do you mean the child AccessibleObjects? Where does the ID come from? It's
not a member of AccessibleObject.

AccessibilityNotifyClients is in the Control class. So, from my grid class,
I'm calling this.NotifyAccessibilityClients(...).

Now, I have a GridAccessibleObject derived from
Control.ControlAccessibleObject. I have RowAccessibleObject,
ColumnAccessibleObject, and CellAccessibleObject all derived from
AccessibleObject (not Control.ControlAccessibleObject because non are actual
controls)

GridAccessibleObject contains rows and column. Rows contain cells.

So, back to the Grid class, if I'm calling AccessibilityNotifyClients(), how
do I specify a cell?

It can't be the index into GridAccessibleObject.GetChild() because the cells
are children of the Row, not the grid. It can't be the index into
Row.GetChild() because those overlap with the columns and grid and all the
other rows. Every row has a Child(0), for example.

The rows and cells aren't control, so there's no AccessibilityNotifyClients
to be called against a row or cell.

Is this all clear? Am I just completely missing something?

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top