Also inline, prefaced with AG:.
- The nodes in the IA@_Range structure may be generic IAccessibles and not necessarily IAccessibleText. That would cover the case of a composite image with an array of image children that can be selected individually. So the point is: * if returned accessible implements IAccessibleText then the integer is an offset within the accessible * if returned accessible is generic IAccessible then the integer is child index. The point is *before* a referred child. If the integer equals to children count then the point is after a last child. Is that correct? If so then what would you name 'startOffset' and 'endOffset' struct members since 'offset' doesn't apply longer. AG: exactly right. I’d keep the names start/endOffset, since in both cases are offsets in a sequence, of chars or objects. - In some cases it would be good to specify which limit of the range is the anchor and which the active end. We could add that to the structure as an additional member, or simply document the convention that start = anchor and end = active. If we go with the latter, then start does not have to be <= end in the Accessible order. Can you give an example please? I'm not sure I follow the use case. AG: in a list with selected items, you may want to know the last selected item, which should be the active end of the selection range. Same with the selected text in a doc, client may need to know whether you were selecting text in a line left to right or in reverse. That info may be inferred by client if it combines info about focus or caret position with the selection range. But in many cases the server could make it easier for the client by exposing the anchor and active ends since the server has to keep track of that anyway. Best regards, --Andres. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Alexander Surkov Sent: Thursday, October 29, 2015 9:02 AM To: [email protected]<mailto:[email protected]>; James Teh Subject: [Accessibility-ia2] a new method to retrieve the selection Here's outcome email from Mozilla bug [1] discussion, where Jamie (NVDA) and me concluded that IAccessible2 environment would benefit from having a new method to retrieve text/content selection in perfromant way. The idea is to supplement IAccesible2_2::accessibleWithCaret method, introduced for caret, by similar method for selection getting. The proposed method may look like typedef struct IA2Range { AccessibleText* start; long startOffset; AccessibleText* end; long endOffset; } IA2Range; selectionRanges([out, size_is(,*nRanges) IA2Range **ranges, [out, retval] long *nRanges); which returns an array of all continues selection ranges within the given accessible, and hosted by new IAccessible2_3 inherited from IAccessible2_2. Another idea from that thread was to keep newly added interfaces unfrozen, until we are confident the interface will need no change in the nearest future. So we'll be adding new methods into the end of the interface, to keep binary compatibility. Please let me know your thinking. Thank you. Alexander. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1052866
_______________________________________________ Accessibility-ia2 mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2
