Hi Alex, This sounds fine. My main concern was to avoid returning offsets which don't include the requested offset, which this approach achieves.
Jamie On 16/04/2010 10:19 PM, Alexander Surkov wrote: > Hi, James. > > I agree. However I would suggest to not create own range for embed > character placed in the start or in the end of hyper text accessible > because embed character shouldn't break ranges. So ranges could look > like > > [*plain*plain)[**bold*bold*) > > i.e. there are two ranges [0, 12), [12, 24), i.e. start offset of the > range should 12 be for given offsets 12 (third embed char) and 13 > (forth embed char). > > So the rule could be > > 1) Embed characters doesn't break the range, i.e. if embed characters > are placed inside a text and text attribute values are the same for > left and right parts of the text then range includes embed characters > (even if value of some text attribute is changed inside an embed > character). > 2) Embed characters are included into right range, i.e. If embed > characters are placed inside a text and a text attribute value is > different for left and right parts of the text then right range is > started from the first embed character, left range doesn't include > embed characters. > 3) Trailing embed characters are included into last range, i.e. if > embed characters are last characters of hyper text accessible then > they are included into last range. > > How does it sound? > > Thank you. > Alex. > > On Fri, Apr 16, 2010 at 1:56 PM, James Teh<[email protected]> wrote: >> On 16/04/2010 2:09 PM, Alexander Surkov wrote: >>>> Unfortunately, I don't really have any other options which don't involve >>>> having separate attribute runs for at least some embedded objects. For >>>> example, one possibility is to always include embedded objects at the >>>> end of an attribute run >>> This is a mirror suggestion to the my one. >> If I understand your suggestion correctly, mine isn't a mirror. However, >> I didn't explain it properly, so allow me to clarify: >> >> I don't think a returned range of offsets should *ever* exclude the >> requested offset. This is very confusing and could lead to nasty loops. >> >> Using your example: >> *plain*plain**bold*bold* >> My idea is that any embedded objects at the beginning of the text will >> be in their own range; i.e. offset 0 will return (0, 1). Offsets 1 >> through 13 would return (1, 14). Offsets 14 through 23 would return (14, >> 24). >> >> You could also do this in reverse; i.e. any embedded objects at the end >> of the text have their own range. In this case, offsets 0 through 11 >> would return (0, 12). Offsets 12 through 22 would return (12, 23). >> Offset 23 would return (23, 24). >> >> Jamie >> >> -- >> James Teh >> Vice President >> NV Access Inc, ABN 61773362390 >> Email: [email protected] >> Web site: http://www.nvaccess.org/ >> _______________________________________________ >> Accessibility-ia2 mailing list >> [email protected] >> https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2 >> -- James Teh Vice President NV Access Inc, ABN 61773362390 Email: [email protected] Web site: http://www.nvaccess.org/ _______________________________________________ Accessibility-ia2 mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2
