Accessibility Domain
Methods
- Accessibility.disable
- Accessibility.enable
- Accessibility.getAXNodeAndAncestors Experimental
- Accessibility.getChildAXNodes Experimental
- Accessibility.getFullAXTree Experimental
- Accessibility.getPartialAXTree Experimental
- Accessibility.getRootAXNode Experimental
- Accessibility.queryAXTree Experimental
Events
- Accessibility.loadComplete Experimental
- Accessibility.nodesUpdated Experimental
Types
Methods
Accessibility.enable #
Enables the accessibility domain which causes AXNodeIds to remain consistent between method calls.
This turns on accessibility for the page, which can impact performance until accessibility is disabled.
Accessibility.getAXNodeAndAncestors Experimental#
Fetches a node and all ancestors up to and including the root.
Requires enable() to have been called previously.
Parameters
nodeIdOptional
Identifier of the node to get.
backendNodeIdOptional
Identifier of the backend node to get.
objectIdOptional
JavaScript object id of the node wrapper to get.
Return object
nodes array[ AXNode ]Accessibility.getChildAXNodes Experimental#
Fetches a particular accessibility node by AXNodeId.
Requires enable() to have been called previously.
Parameters
id frameIdOptional
The frame in whose document the node resides. If omitted, the root frame is used.
Return object
nodes array[ AXNode ]Accessibility.getFullAXTree Experimental#
Fetches the entire accessibility tree for the root Document
Parameters
depthOptional
integerThe maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
frameIdOptional
The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.
Return object
nodes array[ AXNode ]Accessibility.getPartialAXTree Experimental#
Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
Parameters
nodeIdOptional
Identifier of the node to get the partial accessibility tree for.
backendNodeIdOptional
Identifier of the backend node to get the partial accessibility tree for.
objectIdOptional
JavaScript object id of the node wrapper to get the partial accessibility tree for.
fetchRelativesOptional
booleanWhether to fetch this node's ancestors, siblings and children. Defaults to true.
Return object
nodes array[ AXNode ]The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and
children, if requested.
Accessibility.getRootAXNode Experimental#
Fetches the root node.
Requires enable() to have been called previously.
Parameters
frameIdOptional
The frame in whose document the node resides. If omitted, the root frame is used.
Return object
node Accessibility.queryAXTree Experimental#
Query a DOM node's accessibility subtree for accessible name and role.
This command computes the name and role for all nodes in the subtree, including those that are
ignored for accessibility, and returns those that match the specified name and role. If no DOM
node is specified, or the DOM node does not exist, the command returns an error. If neither
accessibleName or role is specified, it returns all the accessibility nodes in the subtree.
Parameters
nodeIdOptional
Identifier of the node for the root to query.
backendNodeIdOptional
Identifier of the backend node for the root to query.
objectIdOptional
JavaScript object id of the node wrapper for the root to query.
accessibleNameOptional
stringFind nodes with this computed name.
roleOptional
stringFind nodes with this computed role.
Return object
nodes array[ AXNode ]A list of Accessibility.AXNode matching the specified attributes,
including nodes that are ignored for accessibility.
Events
Types
Accessibility.AXNode #
A node in the accessibility tree.
Type: object
Properties
nodeId Unique identifier for this node.
ignored booleanWhether this node is ignored for accessibility
ignoredReasonsOptional
array[ AXProperty ]Collection of reasons why this node is hidden.
roleOptional
This Node's role, whether explicit or implicit.
chromeRoleOptional
This Node's Chrome raw role.
nameOptional
The accessible name for this Node.
descriptionOptional
The accessible description for this Node.
valueOptional
The value for this Node.
propertiesOptional
array[ AXProperty ]All other properties
parentIdOptional
ID for this node's parent.
childIdsOptional
array[ AXNodeId ]IDs for each of this node's child nodes.
backendDOMNodeIdOptional
The backend ID for the associated DOM node, if any.
frameIdOptional
The frame ID for the frame associated with this nodes document.
Accessibility.AXProperty #
Type: object
Properties
name The name of this property.
value The value of this property.
Accessibility.AXPropertyName #
Values of AXProperty name:
- from 'busy' to 'roledescription': states which apply to every AX node
- from 'live' to 'root': attributes which apply to nodes in live regions
- from 'autocomplete' to 'valuetext': attributes which apply to widgets
- from 'checked' to 'selected': states which apply to widgets
- from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling
- from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden
Type: string
Allowed values: actions, busy, disabled, editable, focusable, focused, hidden, hiddenRoot, invalid, keyshortcuts, settable, roledescription, live, atomic, relevant, root, autocomplete, hasPopup, level, multiselectable, orientation, multiline, readonly, required, valuemin, valuemax, valuetext, checked, expanded, modal, pressed, selected, activedescendant, controls, describedby, details, errormessage, flowto, labelledby, owns, url, activeFullscreenElement, activeModalDialog, activeAriaModalDialog, ariaHiddenElement, ariaHiddenSubtree, emptyAlt, emptyText, inertElement, inertSubtree, labelContainer, labelFor, notRendered, notVisible, presentationalRole, probablyPresentational, inactiveCarouselTabContent, uninteresting
Accessibility.AXRelatedNode #
Type: object
Properties
backendDOMNodeId The BackendNodeId of the related DOM node.
idrefOptional
stringThe IDRef value provided, if any.
textOptional
stringThe text alternative of this node in the current context.
Accessibility.AXValue #
A single computed AX property.
Type: object
Properties
type The type of this value.
valueOptional
anyThe computed value of this property.
relatedNodesOptional
array[ AXRelatedNode ]One or more related nodes, if applicable.
sourcesOptional
array[ AXValueSource ]The sources which contributed to the computation of this property.
Accessibility.AXValueNativeSourceType #
Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
Type: string
Allowed values: description, figcaption, label, labelfor, labelwrapped, legend, rubyannotation, tablecaption, title, other
Accessibility.AXValueSource #
A single source for a computed AX property.
Type: object
Properties
type What type of source this is.
valueOptional
The value of this property source.
attributeOptional
stringThe name of the relevant attribute, if any.
attributeValueOptional
The value of the relevant attribute, if any.
supersededOptional
booleanWhether this source is superseded by a higher priority source.
nativeSourceOptional
The native markup source for this value, e.g. a <label> element.
nativeSourceValueOptional
The value, such as a node or node list, of the native source.
invalidOptional
booleanWhether the value for this property is invalid.
invalidReasonOptional
stringReason for the value being invalid, if it is.
Accessibility.AXValueSourceType #
Enum of possible property sources.
Type: string
Allowed values: attribute, implicit, style, contents, placeholder, relatedElement
Accessibility.AXValueType #
Enum of possible property types.
Type: string
Allowed values: boolean, tristate, booleanOrUndefined, idref, idrefList, integer, node, nodeList, number, string, computedString, token, tokenList, domRelation, role, internalRole, valueUndefined