Hi.

There are two problems here:
1. It's unclear what is considered the "text" of a descendant node which doesn't support IAccessibleText. It could be accName, accValue, accDescription, etc. or some combination thereof. 2. This assumes that a descendant node's "text" actually is contained in the ancestor IAccessibleText object, which might not be the case. Of course, I guess the method could just fail if this weren't the case.

Also, why not just implement IAccessibleText on the descendant nodes?

In any case, I don't think a new method is required for this. You can implement IAccessibleHyperlink on the descendant nodes. The startIndex and endIndex properties of IAccessibleHyperlink should give you what you need.

Jamie

On 21/11/2012 9:30 AM, Brett Lewis wrote:
All:
I have recently run into a situation for which there presently doesn't
appear to be a good solution.
1.  The problem.  I wished to obtain the attributes for the text at a
particular offset.  This is straightforward using IAccessibleText and
just asking for the attributes at the offset of interest.  The
difficulty is that the node whose text attributes I wanted didn't
support IAccessibleText.  One of its ancestors did and this ancestor did
contain information about the attributes I needed.  The question
then became, how can I find out where in a given IAccessibleText string
does a descendants node text begin.  I haven't found an easy way to
answer this question.
2.  Proposed solution:  Add a new function that returns the offset in
the current IAccessibleText text string for a given IAccessible for a
descendant. So something like:
DescendantOffset(IAccessible* acc,VARIANT varChild, long* offset)
I have no strong preference for exactly how this should be handled, just
the need for such a function.
I know the 1.3 version of the IAccessible2 specification is nearly
ready, but I would like to see if this new function could be included.
In addition to the attributes for text at a given offset, I have also
seen a case where we needed the rectangle for particular characters.
Again, in this instance, we needed to locate the nearest ancestor
supporting IAccessibleText and try to determine the offset in this
ancestor of the node of interest.
What does everyone think about such an addition?
Any feedback would be much appreciated.
Thanks,
Brett Lewis


_______________________________________________
Accessibility-ia2 mailing list
Accessibility-ia2@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2


--
James Teh
Director, NV Access Limited
Email: ja...@nvaccess.org
Web site: http://www.nvaccess.org/
Phone: +61 7 5667 8372
_______________________________________________
Accessibility-ia2 mailing list
Accessibility-ia2@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2

Reply via email to