nsIAccessibleRelation 编辑

accessible/public/nsIAccessibleRelation.idlScriptable This interface gives access to an accessibles set of relations. 1.0 66 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

AttributeTypeDescription
relationTypeunsigned longReturns the type of the relation. Read only.
targetsCountunsigned longReturns the number of targets for this relation. Read only.

Constants

ConstantValueDescription
RELATION_NUL0x00 
RELATION_CONTROLLED_BY0x01Some attribute of this object is affected by a target object.
RELATION_CONTROLLER_FOR0x02This object is interactive and controls some attribute of a target object.
RELATION_LABEL_FOR0x03This object is label for a target object.
RELATION_LABELLED_BY0x04

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_OF0x05This 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_OF0x06This object is a child of a target object.
RELATION_FLOWS_TO0x07Content 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_FROM0x08Content 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_OF0x09This object is a sub window of a target object.
RELATION_EMBEDS0x0aThis 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_BY0x0bThis object is embedded by a target object.
RELATION_POPUP_FOR0x0cThis 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_OF0x0dThis object is a parent window of the target object.
RELATION_DESCRIBED_BY0x0e

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_FOR0x0fThis object is describes the target object.
RELATION_DEFAULT_BUTTON0x4000Part 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:60 次

字数:8979

最后编辑:8 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文