Being generic isn't necessary bad. I'm not sure though that an
alternative and unambiguous text interface implementation is possible.
But I'm fine with the method as long as it allows Firefox to return -1
for the accessible having no IAccessibleText immediate parent.

I'd love to hear what Jamie thinks.

Thank you.
Alex.


On Thu, Feb 7, 2013 at 12:10 PM, Pete Brunet <p...@a11ysoft.com> wrote:
> Alex, Do you see any need to restrict this to the immediate parent?  I'm
> going to assume not in the following:
>
> HRESULT IAccessible2_2::offsetInAncestorText (
>     [out] long* offset
>   );
>
> Return the text offset in an ancestor node.
>
> Determine the closest ancestor in the tree of accessibles which implements
> IAccessibleText and return the offset in that accessible which corresponds
> to the beginning of the text associated with this accessible.
>
> Returns:
>   S_OK is returned if an ancestor accessible implements IAccessibleText.
>   S_FALSE is returned if no ancestor node implementing IAccessibleText are
> found; [out] value is -1.
>
>
> On 2/6/13 8:55 PM, Alexander Surkov wrote:
>
> Hi, Pete. "if a parent accessible implements" and "if no parent nodes
> implementing IAccessibleText are found" sounds ambiguously. 1st
> assumes an immediate parent, 2nd assumes an accessible from the parent
> chain. I'm not sure about other IA2 implementation but in Firefox if
> the parent accessible doesn't implement IAccessibleText then this
> accessible can't be a text of some other accessible from the parent
> chain. In other words only 1st scenario is possible in Firefox.
>
> Thank you.
> Alex.
>
>
> On Thu, Feb 7, 2013 at 11:42 AM, Pete Brunet <p...@a11ysoft.com> wrote:
>
> Thanks Alex, How is this?
>
> HRESULT IAccessible2_2::offsetInParentText (
>     [out] long* offset
>   );
>
> Return text offset in parent.
>
> Determine the parent accessible which implements IAccessibleText and
> return the offset in that object which corresponds to the beginning of
> the text associated with this accessible.
>
> Returns:
>   S_OK         is returned if a parent accessible implements
> IAccessibleText.
>   S_FALSE    is returned if no parent nodes implementing IAccessibleText
> are found; [out] value is -1.
>
> On 2/6/13 8:02 PM, Alexander Surkov wrote:
>
> Hi, Pete. The method looks ok. Few notes.
>
> If this accessible implements IAccessibleText then it can be a child
> of another IAccessibleText, in this case it also has associated text
> (embedded character) and thus it has valid offset. Btw, I would use -1
> in case when there's no parent IAccessibleText instead of 0 since 0 is
> valid offset and it may be confusing (I saw S_FALSE which is
> reasonable but anyway).
>
> Thank you.
> Alex.
>
>
> On Thu, Feb 7, 2013 at 2:43 AM, Pete Brunet <p...@a11ysoft.com> wrote:
>
> Since there is a need for this and the solution is easy to implement it
> seems worth adding.  Here is a draft for review.
>
> HRESULT IAccessible2_2::offsetInParentText (
>     [out] long* offset
>   );
>
> Return text offset in parent.
>
> Determine the parent accessible which implements IAccessibleText and return
> the offset in that object which corresponds to the beginning of the text
> associated with this accessible.  If this accessible implements
> IAccessibleText, 0 will be returned.
>
> Returns:
>   S_OK is returned if this accessible or a parent accessible implements
> IAccessibleText.
>   S_FALSE is returned if no nodes implementing IAccessibleText are found;
> [out] value is 0.
>
>
> On 2/5/13 10:58 PM, Alexander Surkov wrote:
>
> Hi, Pete.
>
> Options were discussed:
> 1) make text leaf accessible implement IAccessibleText (I didn't like
> it, see
> http://lists.linuxfoundation.org/pipermail/accessibility-ia2/2012-November/001731.html)
> 2) make text leaf accessible implement IAccessibleHyperLink (I didn't
> like it, see
> http://lists.linuxfoundation.org/pipermail/accessibility-ia2/2012-November/001731.html)
> 3) add a new method DescendantOffset(IAccessible* acc, long* offset)
> like Brett suggested (see
> http://lists.linuxfoundation.org/pipermail/accessibility-ia2/2012-November/001729.html).
> I don't mind. It's easy to implement.
> 4) do nothing (Jamie mentioned that pure
> IAccessibleText/HyperLink/HyperText should work also as alternative
> approach to the approach described by Brett, but here we probably run
> into restrictions of proprietary softwares).
>
> Thank you.
> Alex.
>
>
> On Wed, Feb 6, 2013 at 2:31 AM, Pete Brunet <p...@a11ysoft.com> wrote:
>
> To all,
>
> Please review the thread Brett started at:
> http://lists.linuxfoundation.org/pipermail/accessibility-ia2/2012-November/001729.html
>
> to see if any further progress can be made on this issue.
>
>
> On 2/5/13 8:46 AM, Brett Lewis wrote:
>
> Hi,
> I wish we could get it in but it definitely sounded like there was no
> consensus on the issue, so let's let it go.
> Thanks,
> Brett
>
>
> ________________________________
> From: Pete Brunet [mailto:p...@a11ysoft.com]
> Sent: Monday, February 04, 2013 7:02 PM
> To: Brett Lewis
> Cc: IAccessible2 mailing list
> Subject: Re: [Accessibility-ia2] Plea for a new function
>
> Hi Brett, Is this still an issue for you?  We're very near the end of
> discussions for IA2 1.3 and wanted to see if more discussion is needed on
> this issue.  -Pete
>
> On 11/26/12 7:03 PM, James Teh wrote:
>
> On 27/11/2012 8:02 AM, Brett Lewis wrote:
>
> I am getting the Iaccessible tree.  I then find that I want the text
> attributes for one of my leaf nodes and find that I have to go back up the
> Iaccessible tree to find the nearest Iaccessible node that allow QI to
> IAccessibleText and then trying to figure out how to map the result back
> down to my Iaccessible leaf node.
>
> If you can, for Mozilla, it's best to ignore leaf nodes altogether; i.e.
> pretend they don't exist. That way, you're only dealing with nodes that
> support IAccessibleText. However, there may well be a good reason you can't
> do this.
>
> Jamie
>
>
> --
> Pete Brunet
>
> a11ysoft - Accessibility Architecture and Development
> (512) 467-4706 (work), (512) 689-4155 (cell)
> Skype: pete.brunet
> IM: ptbrunet (AOL, Google), ptbru...@live.com (MSN)
> http://www.a11ysoft.com/about/
> Ionosphere: WS4G
_______________________________________________
Accessibility-ia2 mailing list
Accessibility-ia2@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2

Reply via email to