Introduction
Text attributes are implemented in Firefox 3.5 (Gecko 1.9.1). You can obtain text attributes by nsIAccessibleText.getTextAttributes() method and nsIAccessibleText.defaultTextAttributes property.
Attributes List
Unsorted text attributes
- language
- Exposed if the language is specified in the text, see [RFC1766] for valid values. Primary language is defined by html:lang attribute.
- invalid
- Currently exposed if the text is misspelled (visually it's underlined by red line). Possible value is 'spelling'.
- auto-generated
- Set to "true" for list bullets or other static text in a document which is part of the layout but has no DOM node of its own. May be generated by CSS rules such as text inserted via a ::before or :after.
CSS text attributes
- background-color
- Background color, the value is exposed as string
rgb(r, g, b)wherer,g,bare 0-255 (see CSSbackground-colorproperty). - color
- Color, the value is exposed as string
rgb(r, g, b)wherer,g,bare 0-255 (see CSScolorproperty). - font-family
- Font name (see CSS
font-familyproperty). - font-style
- Font style (see CSS
font-styleproperty). - font-size
- Font size, exposed in 'pt' units, corresponds to font size of actually used font (see CSS
font-sizeproperty). - font-weight
- Font weight, the number from the list '100', ... '900', corresponds to font weight of actually used font. (see CSS
font-weightproperty). - text-line-through-style
- Exposed if there is a line (strike) through the text, the value is
solid(corresponds toline-throughvalue of CSStext-decorationproperty). - text-underline-style
- Exposed if text is underlined, the value is
solid(corresponds tounderlinevalue of CSStext-decorationproperty). - text-position
- Specifies the vertical alignment of the text (see CSS
vertical-alignproperty).