Re: Accessibility children: all or visible
Re: Accessibility children: all or visible
- Subject: Re: Accessibility children: all or visible
- From: Christiaan Hofman <email@hidden>
- Date: Wed, 23 Apr 2008 01:11:32 +0200
On 22 Apr 2008, at 10:51 PM, Mike Engber wrote:
Is it important that the Children attribute returns all the
children of a view, or would it be OK to return only the currently
available children? In my app getting all the children may be
pretty slow, while there are usually just a few child elements
visible at a time. The data is divided in pages, and the display
only reads the pages that are needed for display. Could I do the
same with the accessible children, and only return the children of
my view that are contained in the visible pages? Or doesn't
accessibility care too much about the visible area?
It is expected that all children would be returned from
AXChildren. There is an AXVisibleChildren attribute, but it is
defined only for AXRow/AXTableRow/AXOutlineRow, AXMenu, AXMenuBar,
AXRadioGroup, and AXList.
You might consider some sort of caching scheme. I know it can be
complicated to keep the cache current, but even if you have a very
conservative strategy it could be a big win. If you look at the
message pattern, you'll see the you're likely to be asked for the
children many times in rapid succession.
E.g. Even for something as simple as an assistive app trying to get
the description of the focused element (and it's one of your
children) - I'd guess that the children will be requested 2, 3 or
more times.
So, even if you invalidate your cache at the drop of a hat (e.g. any
user action) - it could be a big win for typical interaction with an
assitive app.
Note, if don't return all your children, one problem (apart from not
conforming) scenario would be that you return a child, and then
later get that child handed back to you (e.g. for an attribute
request) when it's no longer visible. Depending on your
implementation details, this could mean that when the child comes
back it's interpreted as a completely different element. E.g.
initially it was the 3rd visible child, now, after scrolling the 3rd
visible child is some other element - doh!
-ME
For what kind of purposes is the array of children actually used? As
the children in my case are organized in pages, could it work to add
an extra layer of ignored faux elements for the pages? Those could
just wrap around an index and the parent view, and have the actual
subelements as children. I guess then assistive apps would only pry
depper into the children of the pages for the pages that are relevant.
Can it work to have faux elements that are ignored?
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