nsIAccessibleRelation

This interface gives access to an accessibles set of relations.
1.0
28
Introduced
Gecko 1.9
Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3)

Note: Be carefull, do not change constants until ATK has a structure to map gecko constants into ATK constants.

Method overview

nsIAccessible getTarget(in unsigned long index);
nsIArray getTargets();

Attributes

Attribute Type Description
relationType unsigned long Returns the type of the relation. Read only.
targetsCount unsigned long Returns the number of targets for this relation. Read only.

Constants

Constant Value Description
RELATION_NUL 0x00  
RELATION_CONTROLLED_BY 0x01 Some attribute of this object is affected by a target object.
RELATION_CONTROLLER_FOR 0x02 This object is interactive and controls some attribute of a target object.
RELATION_LABEL_FOR 0x03 This object is label for a target object.
RELATION_LABELLED_BY 0x04

This object is labelled by a target object. If the accessible has an nsIAccessible.name() , you can get the nsIAccessible that it was labelled by in order to get more formatting information.

Note: The label and description (see RELATION_DESCRIBED_BY) relations may be used to prevent redundant information from being presented by the screen reader, since the label and description can occur both on their own, and in the name or description fields of an nsIAccessible.
RELATION_MEMBER_OF 0x05 This object is a member of a group of one or more objects. When there is more than one object in the group each member may have one and the same target, for example a grouping object. It is also possible that each member has multiple additional targets, for example one for every other member in the group.
RELATION_NODE_CHILD_OF 0x06 This object is a child of a target object.
RELATION_FLOWS_TO 0x07 Content flows from this object to a target object, that is has content that flows logically to another object in a sequential way, for example text flow.
RELATION_FLOWS_FROM 0x08 Content flows to this object from a target object, that is has content that flows logically from another object in a sequential way, for example text flow.
RELATION_SUBWINDOW_OF 0x09 This object is a sub window of a target object.
RELATION_EMBEDS 0x0a This object embeds a target object. This relation can be used on the OBJID_CLIENT accessible for a top level window to show where the content areas are. It points to the accessible object corresponding to the root of content in that window. This relation is very useful for finding the content quickly, and is the proper method for finding content in Gecko 1.9 and beyond.
RELATION_EMBEDDED_BY 0x0b This object is embedded by a target object.
RELATION_POPUP_FOR 0x0c This object is a transient component related to the target object. When this object is activated the target object doesn't lose focus.
RELATION_PARENT_WINDOW_OF 0x0d This object is a parent window of the target object.
RELATION_DESCRIBED_BY 0x0e

This object is described by the target object. If the accessible has an nsIAccessible.description() , you can get the nsIAccessible that it was described by in order to get more formatting information.

Note: The label (see RELATION_LABELLED_BY) and description relations may be used to prevent redundant information from being presented by the screen reader, since the label and description can occur both on their own, and in the name or description fields of an nsIAccessible.
RELATION_DESCRIPTION_FOR 0x0f This object is describes the target object.
RELATION_DEFAULT_BUTTON 0x4000 Part of a form/dialog with a related default button. It is used for MSAA only, no for IA2 nor ATK/AT-SPI.

Methods

getTarget()

Returns accessible relation target at the given index.

nsIAccessible getTarget(
  in unsigned long index
);

Parameters

index
Zero-based index of relation target.

Return value

Returns an nsIAccessible object.

Exceptions thrown

NS_ERROR_INVALID_ARG
Indicates the given index is out of range.

getTargets()

Returns an array of accessible relation targets.

nsIArray getTargets();

Parameters

None.

Return value

An nsIArray object, each item in the array implements an nsIAccessible.

Document Tags and Contributors

 Contributors to this page: Sheppy, ethertank, trevorh, Surkov.alexander
 Last updated by: Sheppy,