nsIAccessible

IID:DB717DB4-37E9-42F1-A3B0-2579DD7C3814
Inherits From:nsISupports
Status:UNDER_REVIEW

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.


Constants

MSAA State flags - used for bitfield. More than 1 allowed.
PRUint32 STATE_UNAVAILABLE = 1
PRUint32 STATE_SELECTED = 2
PRUint32 STATE_FOCUSED = 4
PRUint32 STATE_PRESSED = 8
PRUint32 STATE_CHECKED = 16
PRUint32 STATE_MIXED = 32
PRUint32 STATE_READONLY = 64
PRUint32 STATE_HOTTRACKED = 128
PRUint32 STATE_DEFAULT = 256
PRUint32 STATE_EXPANDED = 512
PRUint32 STATE_COLLAPSED = 1024
PRUint32 STATE_BUSY = 2048
PRUint32 STATE_FLOATING = 4096
PRUint32 STATE_MARQUEED = 8192
PRUint32 STATE_ANIMATED = 16384
PRUint32 STATE_INVISIBLE = 32768
PRUint32 STATE_OFFSCREEN = 65536
PRUint32 STATE_SIZEABLE = 131072
PRUint32 STATE_MOVEABLE = 262144
PRUint32 STATE_SELFVOICING = 524288
PRUint32 STATE_FOCUSABLE = 1048576
PRUint32 STATE_SELECTABLE = 2097152
PRUint32 STATE_LINKED = 4194304
PRUint32 STATE_TRAVERSED = 8388608
PRUint32 STATE_MULTISELECTABLE = 16777216
PRUint32 STATE_EXTSELECTABLE = 33554432
PRUint32 STATE_ALERT_LOW = 67108864
PRUint32 STATE_ALERT_MEDIUM = 134217728
PRUint32 STATE_ALERT_HIGH = 268435456
PRUint32 STATE_PROTECTED = 536870912
PRUint32 STATE_HASPOPUP = 1073741824
PRUint32 STATE_REQUIRED = 67108864
PRUint32 STATE_IMPORTANT = 134217728
PRUint32 STATE_INVALID = 268435456
PRUint32 STATE_CHECKABLE = 8192
Extended state flags (for now non-MSAA, for Java and Gnome/ATK support) "Extended state flags" has seperate value space from "MSAA State flags".
PRUint32 EXT_STATE_EDITABLE = 2097152
PRUint32 EXT_STATE_ACTIVE = 4194304
PRUint32 EXT_STATE_EXPANDABLE = 8388608
PRUint32 EXT_STATE_MODAL = 16777216
PRUint32 EXT_STATE_MULTI_LINE = 33554432
PRUint32 EXT_STATE_SENSITIVE = 67108864
PRUint32 EXT_STATE_SHOWING = 268435456
PRUint32 EXT_STATE_SINGLE_LINE = 536870912
PRUint32 EXT_STATE_TRANSIENT = 1073741824
PRUint32 EXT_STATE_VERTICAL = -2147483648
Relation Types -- most of these come from ATK's atkrelationtype.h RELATION_NULL: RELATION_CONTROLLED_BY: Controlled by one or more target objects. RELATION_CONTROLLER_FOR: Controller for one or more target objects. RELATION_LABEL_FOR: Label for one or more target objects. RELATION_LABELLED_BY: Labelled by one or more target objects. RELATION_MEMBER_OF: Member of a group of one or more target objects. RELATION_NODE_CHILD_OF: Cell in a treetable which is displayed because a cell in the same col is expanded & identifies it. RELATION_FLOWS_TO: Has content that flows logically to another object in a sequential way, e.g. text flow. RELATION_FLOWS_FROM: Has content that flows logically from another object in a sequential way, e.g. text flow. RELATION_SUBWINDOW_OF: Subwindow attached to a component but otherwise not connected in the UI hierarchy to that component. RELATION_EMBEDS: Visually embeds another object's content, i.e. this object's content flows around another's content. RELATION_EMBEDDED_BY: Inverse of RELATION_EMBEDS; this object's content is visually embedded in another object. RELATION_POPUP_FOR: Popup for another object. RELATION_PARENT_WINDOW_OF: Parent window of another object. RELATION_DEFAULT_BUTTON: Part of a form/dialog with a related default button. RELATION_DESCRIBED_BY: Described by one or more target objects. RELATION_DESCRIPTION_FOR: Description for one or more target objects. RELATION_LAST_DEFINED:
PRUint32 RELATION_NUL = 0
PRUint32 RELATION_CONTROLLED_BY = 1
PRUint32 RELATION_CONTROLLER_FOR = 2
PRUint32 RELATION_LABEL_FOR = 3
PRUint32 RELATION_LABELLED_BY = 4
PRUint32 RELATION_MEMBER_OF = 5
PRUint32 RELATION_NODE_CHILD_OF = 6
PRUint32 RELATION_FLOWS_TO = 7
PRUint32 RELATION_FLOWS_FROM = 8
PRUint32 RELATION_SUBWINDOW_OF = 9
PRUint32 RELATION_EMBEDS = 10
PRUint32 RELATION_EMBEDDED_BY = 11
PRUint32 RELATION_POPUP_FOR = 12
PRUint32 RELATION_PARENT_WINDOW_OF = 13
PRUint32 RELATION_DEFAULT_BUTTON = 16384
PRUint32 RELATION_DESCRIBED_BY = 16385
PRUint32 RELATION_DESCRIPTION_FOR = 16386

Properties

readonly PRInt32 childCount

Number of accessible children

readonly AString description

Accessible description -- long text associated with this node

readonly PRUint32 extState

Extended accessible states -- second bit field describing node

readonly PRUint32 finalRole

Enumerated accessible role. The values depend on platform because of variations. See the ROLE_* constants defined later in this file. Widgets can use xhtml2:role to force the final role

readonly PRUint32 finalState

Accessible states -- bit field which describes boolean properties of node. See the STATE_* constants defined later in this file. Widgets that use xhtml2:role can force the state using the attributes disabled, etc.

readonly AString finalValue

Accessible value -- a number or a secondary text equivalent for this node Widgets that use xhtml2:role can force a value using the valuenow attribute

readonly nsIAccessible firstChild

First child in accessible tree

readonly nsIAccessible focusedChild

Focused accessible child of node

readonly AString help

Help text associated with node

readonly PRInt32 indexInParent

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 AString keyBinding

Provides localized string of global keyboard accelerator, such as Ctrl+O for Open file

readonly AString keyboardShortcut

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 nsIAccessible lastChild

Last child in accessible tree

AString name

Accessible name -- the main text equivalent for this node

readonly nsIAccessible nextSibling

Next sibling in accessible tree

readonly PRUint8 numActions

The number of accessible actions associated with this accessible

readonly nsIAccessible parent

Parent node in accessible tree.

readonly nsIAccessible previousSibling

Previous sibling in accessible tree

readonly PRUint32 role

Natural enumerated accessible role for the associated element. The values depend on platform because of variations. See the ROLE_* constants defined later in this file. This does not take into account xhtml2:role as the finalRole does.


Methods

void addSelection ( ) void doAction ( PRUint8 index ) void extendSelection ( ) nsIAccessible getAccessibleAbove ( ) nsIAccessible getAccessibleBelow ( ) nsIAccessible getAccessibleRelated ( PRUint32 relationType ) nsIAccessible getAccessibleToLeft ( ) nsIAccessible getAccessibleToRight ( ) AString getActionName ( PRUint8 index ) void getBounds ( out PRInt32 x , out PRInt32 y , out PRInt32 width , out PRInt32 height ) nsIAccessible getChildAt ( PRInt32 childIndex ) nsIAccessible getChildAtPoint ( PRInt32 x , PRInt32 y ) [noscript] void getNativeInterface ( out voidPtr* outAccessible ) void removeSelection ( ) void takeFocus ( ) void takeSelection ( )

void addSelection ( )

Add this accessible to the current selection


void doAction ( PRUint8 index )

Perform the accessible action at the given zero-based index Action number 0 is the default action

Arguments:
index

void extendSelection ( )

Extend the current selection from its current accessible anchor node to this accessible


nsIAccessible getAccessibleAbove ( )

Accessible node geometrically above this one


nsIAccessible getAccessibleBelow ( )

Accessible node geometrically below this one


nsIAccessible getAccessibleRelated ( PRUint32 relationType )

Accessible node related to this one

Arguments:
relationType

nsIAccessible getAccessibleToLeft ( )

Accessible node geometrically to the left of this one


nsIAccessible getAccessibleToRight ( )

Accessible node geometrically to the right of this one


AString getActionName ( PRUint8 index )

The name of the accessible action at the given zero-based index

Arguments:
index

void getBounds ( out PRInt32 x , out PRInt32 y , out PRInt32 width , out PRInt32 height )

Arguments:
x
y
width
height

nsIAccessible getChildAt ( PRInt32 childIndex )

Nth accessible child using zero-based index or last child if index less than zero

Arguments:
childIndex

nsIAccessible getChildAtPoint ( PRInt32 x , PRInt32 y )

Accessible child which contains the coordinate at x,y

Arguments:
x
y

void getNativeInterface ( out voidPtr* outAccessible )

Get a pointer to accessibility interface for this node, which is specific to the OS/accessibility toolkit we're running on.

Arguments:
outAccessible

void removeSelection ( )

Remove this accessible from the current selection


void takeFocus ( )

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 takeSelection ( )

Select this accessible node only


References

This interface is the type of the following properties:

nsIAccessible.firstChild, nsIAccessible.focusedChild, nsIAccessible.lastChild, nsIAccessible.nextSibling, nsIAccessible.parent, nsIAccessible.previousSibling, nsIAccessibleDocument.caretAccessible, nsIAccessibleEvent.accessible, nsIAccessibleProvider.accessible, nsIAccessibleTable.caption

This interface is passed as an argument to the following methods:

nsIAccessibilityService.createHTMLAreaAccessible, nsIAccessibilityService.createHTMLSelectOptionAccessible, nsPIAccessible.fireToolkitEvent, nsPIAccessible.setFirstChild, nsPIAccessible.setNextSibling, nsPIAccessible.setParent

This interface is returned from the following methods:

nsIAccessibilityService.createHTML4ButtonAccessible, nsIAccessibilityService.createHTMLAccessibleByMarkup, nsIAccessibilityService.createHTMLAreaAccessible, nsIAccessibilityService.createHTMLBlockAccessible, nsIAccessibilityService.createHTMLButtonAccessible, nsIAccessibilityService.createHTMLButtonAccessibleXBL, nsIAccessibilityService.createHTMLCheckboxAccessible, nsIAccessibilityService.createHTMLCheckboxAccessibleXBL, nsIAccessibilityService.createHTMLComboboxAccessible, nsIAccessibilityService.createHTMLGenericAccessible, nsIAccessibilityService.createHTMLGroupboxAccessible, nsIAccessibilityService.createHTMLHRAccessible, nsIAccessibilityService.createHTMLImageAccessible, nsIAccessibilityService.createHTMLLIAccessible, nsIAccessibilityService.createHTMLLabelAccessible, nsIAccessibilityService.createHTMLListboxAccessible, nsIAccessibilityService.createHTMLObjectFrameAccessible, nsIAccessibilityService.createHTMLRadioButtonAccessible, nsIAccessibilityService.createHTMLRadioButtonAccessibleXBL, nsIAccessibilityService.createHTMLSelectOptionAccessible, nsIAccessibilityService.createHTMLTableAccessible, nsIAccessibilityService.createHTMLTableCaptionAccessible, nsIAccessibilityService.createHTMLTableCellAccessible, nsIAccessibilityService.createHTMLTableHeadAccessible, nsIAccessibilityService.createHTMLTextAccessible, nsIAccessibilityService.createHTMLTextFieldAccessible, nsIAccessibilityService.createOuterDocAccessible, nsIAccessibilityService.createRootAccessible, nsIAccessibilityService.createXULAlertAccessible, nsIAccessibilityService.createXULButtonAccessible, nsIAccessibilityService.createXULCheckboxAccessible, nsIAccessibilityService.createXULColorPickerAccessible, nsIAccessibilityService.createXULColorPickerTileAccessible, nsIAccessibilityService.createXULComboboxAccessible, nsIAccessibilityService.createXULDropmarkerAccessible, nsIAccessibilityService.createXULGroupboxAccessible, nsIAccessibilityService.createXULImageAccessible, nsIAccessibilityService.createXULLinkAccessible, nsIAccessibilityService.createXULListboxAccessible, nsIAccessibilityService.createXULListitemAccessible, nsIAccessibilityService.createXULMenuSeparatorAccessible, nsIAccessibilityService.createXULMenubarAccessible, nsIAccessibilityService.createXULMenuitemAccessible, nsIAccessibilityService.createXULMenupopupAccessible, nsIAccessibilityService.createXULProgressMeterAccessible, nsIAccessibilityService.createXULRadioButtonAccessible, nsIAccessibilityService.createXULRadioGroupAccessible, nsIAccessibilityService.createXULSelectListAccessible, nsIAccessibilityService.createXULSelectOptionAccessible, nsIAccessibilityService.createXULStatusBarAccessible, nsIAccessibilityService.createXULTabAccessible, nsIAccessibilityService.createXULTabBoxAccessible, nsIAccessibilityService.createXULTabPanelsAccessible, nsIAccessibilityService.createXULTabsAccessible, nsIAccessibilityService.createXULTextAccessible, nsIAccessibilityService.createXULTextBoxAccessible, nsIAccessibilityService.createXULToolbarAccessible, nsIAccessibilityService.createXULToolbarSeparatorAccessible, nsIAccessibilityService.createXULTooltipAccessible, nsIAccessibilityService.createXULTreeAccessible, nsIAccessibilityService.createXULTreeColumnitemAccessible, nsIAccessibilityService.createXULTreeColumnsAccessible, nsIAccessibilityService.getAccessible, nsIAccessible.getAccessibleAbove, nsIAccessible.getAccessibleBelow, nsIAccessible.getAccessibleRelated, nsIAccessible.getAccessibleToLeft, nsIAccessible.getAccessibleToRight, nsIAccessible.getChildAt, nsIAccessible.getChildAtPoint, nsIAccessibleDocument.getAccessibleInParentChain, nsIAccessibleHyperLink.getObject, nsIAccessibleRetrieval.getAccessibleFor, nsIAccessibleRetrieval.getAccessibleInShell, nsIAccessibleRetrieval.getAccessibleInWeakShell, nsIAccessibleRetrieval.getAccessibleInWindow, nsIAccessibleRetrieval.getCachedAccessible, nsIAccessibleSelectable.refSelection, nsIAccessibleTable.cellRefAt, nsIAccessibleTreeCache.getCachedTreeitemAccessible

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com