A cross-platform interface that supports platform-specific accessibility APIs like MSAA and ATK. Contains the sum of what's needed to support IAccessible as well as ATK's generic accessibility objects. Can also be used by in-process accessibility clients to get information about objects in the accessible tree. The accessible tree is a subset of nodes in the DOM tree -- such as documents, focusable elements and text. Mozilla creates the implementations of nsIAccessible on demand. See http://www.mozilla.org/projects/ui/accessibility for more information. @status UNDER_REVIEW
[scriptable, uuid(670fc322-14ec-4f3b-8279-9d62ab8895c0)]
interface nsIAccessible : nsISupports
Attributes
Attributes of accessible
readonly attribute
nsIPersistentProperties
attributes
Number of accessible children
readonly attribute
long
childCount
Array of all this element's children.
readonly attribute
nsIArray
children
Provides localized string of global keyboard accelerator for default action, such as Ctrl+O for Open file
readonly attribute
AString
defaultKeyBinding
Accessible description -- long text associated with this node
readonly attribute
AString
description
Enumerated accessible role. The values depend on platform because of variations. See the ROLE_* constants defined in nsIAccessibleRole. Widgets can use role attribute to force the final role
readonly attribute
unsigned long
finalRole
First child in accessible tree
readonly attribute
nsIAccessible
firstChild
Focused accessible child of node
readonly attribute
nsIAccessible
focusedChild
Help text associated with node
readonly attribute
AString
help
The 0-based index of this accessible in its parent's list of children, or -1 if this accessible does not have a parent.
readonly attribute
long
indexInParent
Provides localized string of accesskey name, such as Alt+D. The modifier may be affected by user and platform preferences. Usually alt+letter, or just the letter alone for menu items.
readonly attribute
AString
keyboardShortcut
Last child in accessible tree
readonly attribute
nsIAccessible
lastChild
Accessible name -- the main text equivalent for this node
attribute
AString
name
Next sibling in accessible tree
readonly attribute
nsIAccessible
nextSibling
The number of accessible actions associated with this accessible
readonly attribute
PRUint8
numActions
Parent node in accessible tree.
readonly attribute
nsIAccessible
parent
Previous sibling in accessible tree
readonly attribute
nsIAccessible
previousSibling
Returns the number of accessible relations for this object.
readonly attribute
unsigned long
relationsCount
Natural enumerated accessible role for the associated element. The values depend on platform because of variations. See the ROLE_* constants defined in nsIAccessibleRole. This does not take into account role attribute as the finalRole does.
readonly attribute
unsigned long
role
Accessible value -- a number or a secondary text equivalent for this node Widgets that use role attribute can force a value using the valuenow attribute
readonly attribute
AString
value
Methods
Perform the accessible action at the given zero-based index Action number 0 is the default action
void
doAction(in PRUint8 index)
Extend the current selection from its current accessible anchor node to this accessible
void
extendSelection()
Accessible node geometrically above this one
nsIAccessible
getAccessibleAbove()
Accessible node geometrically below this one
nsIAccessible
getAccessibleBelow()
Return accessible related to this one by the given relation type (see. constants defined in nsIAccessibleRelation).
nsIAccessible
getAccessibleRelated(in unsigned long aRelationType)
Accessible node geometrically to the left of this one
nsIAccessible
getAccessibleToLeft()
Accessible node geometrically to the right of this one
nsIAccessible
getAccessibleToRight()
The description of the accessible action at the given zero-based index
AString
getActionDescription(in PRUint8 aIndex)
The name of the accessible action at the given zero-based index
AString
getActionName(in PRUint8 index)
Return accessible's x and y coordinates relative to the screen and accessible's width and height.
void
getBounds(out long x, out long y, out long width, out long height)
Nth accessible child using zero-based index or last child if index less than zero
nsIAccessible
getChildAt(in long aChildIndex)
Accessible child which contains the coordinate at (x, y) in screen pixels. If the point is in the current accessible but not in a child, the current accessible will be returned. If the point is in neither the current accessible or a child, then null will be returned. @param x screen's x coordinate @param y screen's y coordinate @return the deepest accessible child containing the given point
nsIAccessible
getChildAtPoint(in long x, in long y)
Deepest accessible child which contains the coordinate at (x, y) in screen pixels. If the point is in the current accessible but not in a child, the current accessible will be returned. If the point is in neither the current accessible or a child, then null will be returned. @param x screen's x coordinate @param y screen's y coordinate @return the deepest accessible child containing the given point
nsIAccessible
getDeepestChildAtPoint(in long x, in long y)
Provides array of localized string of global keyboard accelerator for the given action index supported by accessible. @param aActionIndex - index of the given action
nsIDOMDOMStringList
getKeyBindings(in PRUint8 aActionIndex)
Get a pointer to accessibility interface for this node, which is specific to the OS/accessibility toolkit we're running on.
[noscript]
void
getNativeInterface(out voidPtr aOutAccessible)
Returns one accessible relation for this object. @param index - relation index (0-based)
nsIAccessibleRelation
getRelation(in unsigned long index)
Returns multiple accessible relations for this object.
nsIArray
getRelations()
Accessible states -- bit fields which describe boolean properties of node.
Many states are only valid given a certain role attribute that supports
them.
@param aState - the first bit field (see nsIAccessibleStates::STATE_*
constants)
@param aExtraState - the second bit field
(see nsIAccessibleStates::EXT_STATE_* constants)
void
getState(out unsigned long aState, out unsigned long aExtraState)
Returns grouping information. Used for tree items, list items, tab panel
labels, radio buttons, etc. Also used for collectons of non-text objects.
@param groupLevel - 1-based, similar to ARIA 'level' property
@param similarItemsInGroup - 1-based, similar to ARIA 'setsize' property,
inclusive of the current item
@param positionInGroup - 1-based, similar to ARIA 'posinset' property
void
groupPosition(out long aGroupLevel, out long aSimilarItemsInGroup, out long aPositionInGroup)
Add or remove this accessible to the current selection
void
setSelected(in boolean isSelected)
Focus this accessible node, The state STATE_FOCUSABLE indicates whether this node is normally focusable. It is the callers responsibility to determine whether this node is focusable. accTakeFocus on a node that is not normally focusable (such as a table), will still set focus on that node, although normally that will not be visually indicated in most style sheets.
void
takeFocus()
Select this accessible node only
void
takeSelection()
Compare to: