Hello Alex and Jamie: >>> I'm good to keep that out of box for now as long as we do a generic approach so later we can update just docs.
Andres, what do you think? How we are going to proceed with active/anchor boundaries? Let's move with a proper naming vs one extra member? <<< Agree with Alex that we should get the method signature as generic as possible, so that we don’t have to change it later. But we can have the first implementation focusing on the text only case and make sure it works well there, since this is the case that motivated the addition of the new method. I believe we’ll find that it will be easily extensible to selection of objects in a container. Also agree to renaming the member vars to anchorOffset/activeOffset, or Index instead of offset. As for range boundaries, I like to follow the convention in C++ ranges and many other ranges where the start is inclusive and the end is exclusive. For instance, in the string “abc”, range (0,1) = “a”, range (2,3) = “c”, range (0,lengthof(“abc”)) = “abc”, etc. range (x,x) is an empty or degenerated range for any x and means no selection. Best regards, --Andres. From: Alexander Surkov [mailto:[email protected]] Sent: Thursday, November 12, 2015 10:35 AM To: James Teh Cc: Andres Gonzalez; [email protected] Subject: Re: [Accessibility-ia2] a new method to retrieve the selection On Wed, Nov 11, 2015 at 5:12 PM, James Teh <[email protected]<mailto:[email protected]>> wrote: On 12/11/2015 12:28 AM, Alexander Surkov wrote: I guess it isn't an edge case after all. I was originally confused by using child indexes in the case of no text, as this seems strange to me. I'm not sure where we are on this idea. Do you think we'd rather drop it? Personally, I'd rather have a separate mechanism to deal with selected objects in a container. I think it's just going to get too confusing otherwise. I'm good to keep that out of box for now as long as we do a generic approach so later we can update just docs. Andres, what do you think? How we are going to proceed with active/anchor boundaries? Let's move with a proper naming vs one extra member? I don't really follow this. As I understand it, selection starts are inclusive and selection ends are exclusive. So, why are we talking about "before" a child? If you have 4 children and children 2 and 3 are selected, IMO, the start offset should be 1 (the selection starts at the second child) and the end offset should be 3 (the selection ends after the third child). Maybe this is just terminology; it doesn't really matter so long as we agree on the numbers. :) I'm not sure I have clear understanding how values differs for inclusive and exclusive end boundaries. Can you give me please an example for, say, when a container has one child and it is selected, i.e selection starts before it and ends after it? The way I think of text (and maybe this is wrong visually), if you have the string "a" and you select it, the selection starts *at* the "a" and ends *after* it. So, in that case, start would be 0 and end would be 1. Similarly, if you have just one child, start would be 0 and end would be 1. I have a feeling we're actually talking about the same thing, but you see the seleciton as starting "before", not "at". Jamie -- James Teh Executive Director, NV Access Limited Ph +61 7 3149 3306<tel:%2B61%207%203149%203306> www.nvaccess.org<http://www.nvaccess.org> Facebook: http://www.facebook.com/NVAccess Twitter: @NVAccess SIP: [email protected]<mailto:[email protected]>
_______________________________________________ Accessibility-ia2 mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2
