346
edits
No edit summary |
No edit summary |
||
| Line 27: | Line 27: | ||
; rangeEndOffset | ; rangeEndOffset | ||
: [out] the end offset of the result range | : [out] the end offset of the result range | ||
Ranges are not nested. They are consecutive, so that AT's always know when to ask for the next range. For example, for text 'abc<pre><b></pre>def<pre></b></pre>ghi', there are three ranges (0, 3), (3, 6) and (6, 9). | |||
== Return Value == | == Return Value == | ||
A collection of text attributes (the list of pairs consisted from name and value). | A collection of text attributes (the list of pairs consisted from name and value). All text attributes that apply to the current range are exposed, but in order to conserve the amount of data passed, most text attributes will have reasonable defaults and will not be exposed in the list when they are equal to the default. For example, if font-style is "normal" it will not be exposed in the return value. See the list of text attributes below to find the defaults. | ||
= Events = | = Events = | ||
When a certain text attribute is changed then 'EVENT_TEXT_ATTRIBUTE_CHANGED' event should be fired. | |||
In IA2, there is no data to specify what attribute changed, and for what offsets. Therefore, the AT must cache attributes of any objects that it will want to know about text attribute changes for. For example, it can cache the the text attribute ranges for the current text accessible, and compare the previous text attribute runs with the current text attribute runs. | |||
Events will be fired for the topic object to which they apply, in order to avoid floods of too many events. For example, if someone selects all and then boldfaces the selection -- every object in the accessible tree is essentially getting an attribute change. We will reduce the number of events by only firing the text attribute change event on the root accessible for the change. | |||
= Questions = | = Questions = | ||
== ATK default attribute questions == | == ATK default attribute questions == | ||
# Should we support default attributes? IA2 | # Should we support ATK default attributes? IA2 does not have them. We could do it through an object attribute, if we really need it. | ||
== Unit questions == | == Unit questions == | ||
# The IA2 site does not say what unit color values are exposed as -- it just says use CSS values. However, in CSS colors can be exposed in many different ways. You can use the color name, you can use a 3 digit hex value, a 6 digit hex value, 3 comma-separated unsigned shorts, .... Is it better just to get 3 comma separated unsigned shorts (R, G, B) so you can determine a name for the color yourself? | # The IA2 site does not say what unit color values are exposed as -- it just says use CSS values. However, in CSS colors can be exposed in many different ways. You can use the color name, you can use a 3 digit hex value, a 6 digit hex value, 3 comma-separated unsigned shorts, .... Is it better just to get 3 comma separated unsigned shorts (R, G, B) so you can determine a name for the color yourself? | ||
# We have a similar problem for anything exposing a length, e.g. margin-left. How do you want the units? | # We have a similar problem for anything exposing a length, e.g. margin-left. How do you want the units? | ||
== Event questions == | == Event questions == | ||
# It's not clear how to track CSS style changes mapped to text attributes. Possibly some of those changes will lead accessible is recreated. For the most important case, rich text editing, there will be a DOM change. | |||
# It's not clear how to track CSS style changes mapped to text attributes. Possibly some of those changes will lead accessible is recreated. | |||
= List of supported attributes = | = List of supported attributes = | ||
edits