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
,b
are 0-255 (see CSSbackground-color
property). - color
- Color, the value is exposed as string
rgb(r, g, b)
wherer
,g
,b
are 0-255 (see CSScolor
property). - font-family
- Font name (see CSS
font-family
property). - font-style
- Font style (see CSS
font-style
property). - font-size
- Font size, exposed in 'pt' units, corresponds to font size of actually used font (see CSS
font-size
property). - font-weight
- Font weight, the number from the list '100', ... '900', corresponds to font weight of actually used font. (see CSS
font-weight
property). - text-line-through-style
- Exposed if there is a line (strike) through the text, the value is
solid
(corresponds toline-through
value of CSStext-decoration
property). - text-underline-style
- Exposed if text is underlined, the value is
solid
(corresponds tounderline
value of CSStext-decoration
property). - text-position
- Specifies the vertical alignment of the text (see CSS
vertical-align
property).