346
edits
No edit summary |
|||
| Line 31: | Line 31: | ||
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). | ||
= Events = | = Events = | ||
| Line 47: | Line 38: | ||
When a certain text attribute is changed then 'EVENT_TEXT_ATTRIBUTE_CHANGED' event should be fired. | When a certain text attribute is changed then 'EVENT_TEXT_ATTRIBUTE_CHANGED' event should be fired. | ||
= Questions = | |||
== Range questions == | |||
# What is the range hierarchy: are range nested or consecutive? Let we have a text 'abc<b>def</b>ghi'. If ranges are nested then we have two ranges: (0,9) and (3,6). If ranges are consecutive then we have three ranges (0, 3), (3, 6) and (6, 9). | |||
# Should text attributes in a range be either relative to a parent (in the case of nested ranges) or previous (in the case of consecutive ranges) range or cumulative? | |||
== ATK default attribute questions == | |||
# Should we support default attributes? IA2 hasn't their support. We could do it through an object attribute, if we really need it. | |||
# One thing we can do even for IA2 is specify a default value for attributes that aren't exposed. For example, we could just not expose font-style when it is "normal", and text-align when it is "left". This would save us from exposing a lot of extra attributes -- is it reasonable? | |||
== 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? | |||
# We have a similar problem for anything exposing a length, e.g. margin-left. How do you want the units? | |||
== Event questions == | |||
# How will AT know what attribute has been changed? Should the getTextAttributes() method return only last changed attribute? | |||
# It's not clear how to track CSS style changes mapped to text attributes. Possibly some of those changes will lead accessible is recreated. | |||
# Are more events other than changes to whether an item is misspelled even useful? | |||
# There could be a lot of attribute change events -- for example, if someone selects all and then boldfaces the selection -- every object in the tree is getting an attribute change. We could reduce the number of events by removing events on descendants of something already firing the event. It could be implied by the change event on the ancestor. Is that helfpul? | |||
= List of supported attributes = | = List of supported attributes = | ||
edits