Documentation
¶
Overview ¶
Package accessibility provides the Chrome DevTools Protocol commands, types, and events for the Accessibility domain.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type EventLoadComplete
- type EventNodesUpdated
- type GetAXNodeAndAncestorsParams
- type GetAXNodeAndAncestorsResult
- type GetChildAXNodesParams
- type GetChildAXNodesResult
- type GetFullAXTreeParams
- type GetFullAXTreeResult
- type GetPartialAXTreeParams
- type GetPartialAXTreeResult
- type GetRootAXNodeParams
- type GetRootAXNodeResult
- type Node
- type NodeID
- type Property
- type PropertyName
- type QueryAXTreeParams
- type QueryAXTreeResult
- type RelatedNode
- type Value
- type ValueNativeSourceType
- type ValueSource
- type ValueSourceType
- type ValueType
Constants ¶
const ( CommandDisable = "Accessibility.disable" CommandEnable = "Accessibility.enable" CommandGetPartialAXTree = "Accessibility.getPartialAXTree" CommandGetFullAXTree = "Accessibility.getFullAXTree" CommandGetRootAXNode = "Accessibility.getRootAXNode" CommandGetAXNodeAndAncestors = "Accessibility.getAXNodeAndAncestors" CommandGetChildAXNodes = "Accessibility.getChildAXNodes" CommandQueryAXTree = "Accessibility.queryAXTree" )
Command names.
Variables ¶
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}
Disable disables the accessibility domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-disable
var Enable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandEnable}
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-enable
var GetAXNodeAndAncestors = cdp.Command[GetAXNodeAndAncestorsParams, GetAXNodeAndAncestorsResult]{Method: CommandGetAXNodeAndAncestors}
GetAXNodeAndAncestors fetches a node and all ancestors up to and including the root. Requires enable() to have been called previously.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getAXNodeAndAncestors
var GetChildAXNodes = cdp.Command[GetChildAXNodesParams, GetChildAXNodesResult]{Method: CommandGetChildAXNodes}
GetChildAXNodes fetches a particular accessibility node by AXNodeId. Requires enable() to have been called previously.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getChildAXNodes
var GetFullAXTree = cdp.Command[GetFullAXTreeParams, GetFullAXTreeResult]{Method: CommandGetFullAXTree}
GetFullAXTree fetches the entire accessibility tree for the root Document.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getFullAXTree
var GetPartialAXTree = cdp.Command[GetPartialAXTreeParams, GetPartialAXTreeResult]{Method: CommandGetPartialAXTree}
GetPartialAXTree fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getPartialAXTree
var GetRootAXNode = cdp.Command[GetRootAXNodeParams, GetRootAXNodeResult]{Method: CommandGetRootAXNode}
GetRootAXNode fetches the root node. Requires enable() to have been called previously.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getRootAXNode
var LoadComplete = cdp.Event[EventLoadComplete]{Method: "Accessibility.loadComplete"}
LoadComplete the loadComplete event mirrors the load complete event sent by the browser to assistive technology when the web page has finished loading.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-loadComplete
var NodesUpdated = cdp.Event[EventNodesUpdated]{Method: "Accessibility.nodesUpdated"}
NodesUpdated the nodesUpdated event is sent every time a previously requested node has changed the in tree.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-nodesUpdated
var QueryAXTree = cdp.Command[QueryAXTreeParams, QueryAXTreeResult]{Method: CommandQueryAXTree}
QueryAXTree 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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-queryAXTree
Functions ¶
This section is empty.
Types ¶
type EventLoadComplete ¶
type EventLoadComplete struct {
Root *Node `json:"root"` // New document root node.
}
EventLoadComplete the loadComplete event mirrors the load complete event sent by the browser to assistive technology when the web page has finished loading.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-loadComplete
type EventNodesUpdated ¶
type EventNodesUpdated struct {
Nodes []*Node `json:"nodes"` // Updated node data.
}
EventNodesUpdated the nodesUpdated event is sent every time a previously requested node has changed the in tree.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-nodesUpdated
type GetAXNodeAndAncestorsParams ¶
type GetAXNodeAndAncestorsParams struct {
NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Identifier of the node to get.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node to get.
ObjectID runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"` // JavaScript object id of the node wrapper to get.
}
GetAXNodeAndAncestorsParams are the parameters of the command Accessibility.getAXNodeAndAncestors.
type GetAXNodeAndAncestorsResult ¶ added in v0.157.3
type GetAXNodeAndAncestorsResult struct {
Nodes []*Node `json:"nodes,omitempty,omitzero"`
}
GetAXNodeAndAncestorsResult is the result of the command Accessibility.getAXNodeAndAncestors.
type GetChildAXNodesParams ¶
type GetChildAXNodesParams struct {
ID NodeID `json:"id"`
FrameID cdp.FrameID `json:"frameId,omitempty,omitzero"` // The frame in whose document the node resides. If omitted, the root frame is used.
}
GetChildAXNodesParams are the parameters of the command Accessibility.getChildAXNodes.
type GetChildAXNodesResult ¶ added in v0.157.3
type GetChildAXNodesResult struct {
Nodes []*Node `json:"nodes,omitempty,omitzero"`
}
GetChildAXNodesResult is the result of the command Accessibility.getChildAXNodes.
type GetFullAXTreeParams ¶
type GetFullAXTreeParams struct {
Depth *int64 `json:"depth,omitempty,omitzero"` // The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
FrameID cdp.FrameID `json:"frameId,omitempty,omitzero"` // The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.
}
GetFullAXTreeParams are the parameters of the command Accessibility.getFullAXTree.
type GetFullAXTreeResult ¶ added in v0.157.3
type GetFullAXTreeResult struct {
Nodes []*Node `json:"nodes,omitempty,omitzero"`
}
GetFullAXTreeResult is the result of the command Accessibility.getFullAXTree.
type GetPartialAXTreeParams ¶
type GetPartialAXTreeParams struct {
NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Identifier of the node to get the partial accessibility tree for.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node to get the partial accessibility tree for.
ObjectID runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"` // JavaScript object id of the node wrapper to get the partial accessibility tree for.
FetchRelatives *bool `json:"fetchRelatives,omitempty,omitzero"` // Whether to fetch this node's ancestors, siblings and children. Defaults to true.
}
GetPartialAXTreeParams are the parameters of the command Accessibility.getPartialAXTree.
type GetPartialAXTreeResult ¶ added in v0.157.3
type GetPartialAXTreeResult struct {
Nodes []*Node `json:"nodes,omitempty,omitzero"` // The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
}
GetPartialAXTreeResult is the result of the command Accessibility.getPartialAXTree.
type GetRootAXNodeParams ¶
type GetRootAXNodeParams struct {
FrameID cdp.FrameID `json:"frameId,omitempty,omitzero"` // The frame in whose document the node resides. If omitted, the root frame is used.
}
GetRootAXNodeParams are the parameters of the command Accessibility.getRootAXNode.
type GetRootAXNodeResult ¶ added in v0.157.3
type GetRootAXNodeResult struct {
Node *Node `json:"node,omitempty,omitzero"`
}
GetRootAXNodeResult is the result of the command Accessibility.getRootAXNode.
type Node ¶
type Node struct {
NodeID NodeID `json:"nodeId"` // Unique identifier for this node.
Ignored bool `json:"ignored"` // Whether this node is ignored for accessibility
IgnoredReasons []*Property `json:"ignoredReasons,omitempty,omitzero"` // Collection of reasons why this node is hidden.
Role *Value `json:"role,omitempty,omitzero"` // This Node's role, whether explicit or implicit.
ChromeRole *Value `json:"chromeRole,omitempty,omitzero"` // This Node's Chrome raw role.
Name *Value `json:"name,omitempty,omitzero"` // The accessible name for this Node.
Description *Value `json:"description,omitempty,omitzero"` // The accessible description for this Node.
Value *Value `json:"value,omitempty,omitzero"` // The value for this Node.
Properties []*Property `json:"properties,omitempty,omitzero"` // All other properties
ParentID NodeID `json:"parentId,omitempty,omitzero"` // ID for this node's parent.
ChildIDs []NodeID `json:"childIds,omitempty,omitzero"` // IDs for each of this node's child nodes.
BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId,omitempty,omitzero"` // The backend ID for the associated DOM node, if any.
FrameID cdp.FrameID `json:"frameId,omitempty,omitzero"` // The frame ID for the frame associated with this nodes document.
}
Node a node in the accessibility tree.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXNode
type NodeID ¶
type NodeID string
NodeID unique accessibility node identifier.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXNodeId
type Property ¶
type Property struct {
Name PropertyName `json:"name"` // The name of this property.
Value *Value `json:"value"` // The value of this property.
}
Property [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXProperty
type PropertyName ¶
type PropertyName string
PropertyName 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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXPropertyName
const ( PropertyNameActions PropertyName = "actions" PropertyNameBusy PropertyName = "busy" PropertyNameDisabled PropertyName = "disabled" PropertyNameEditable PropertyName = "editable" PropertyNameFocusable PropertyName = "focusable" PropertyNameFocused PropertyName = "focused" PropertyNameHidden PropertyName = "hidden" PropertyNameHiddenRoot PropertyName = "hiddenRoot" PropertyNameInvalid PropertyName = "invalid" PropertyNameKeyshortcuts PropertyName = "keyshortcuts" PropertyNameSettable PropertyName = "settable" PropertyNameRoledescription PropertyName = "roledescription" PropertyNameLive PropertyName = "live" PropertyNameAtomic PropertyName = "atomic" PropertyNameRelevant PropertyName = "relevant" PropertyNameRoot PropertyName = "root" PropertyNameAutocomplete PropertyName = "autocomplete" PropertyNameHasPopup PropertyName = "hasPopup" PropertyNameLevel PropertyName = "level" PropertyNameMultiselectable PropertyName = "multiselectable" PropertyNameOrientation PropertyName = "orientation" PropertyNameMultiline PropertyName = "multiline" PropertyNameReadonly PropertyName = "readonly" PropertyNameRequired PropertyName = "required" PropertyNameValuemin PropertyName = "valuemin" PropertyNameValuemax PropertyName = "valuemax" PropertyNameValuetext PropertyName = "valuetext" PropertyNameChecked PropertyName = "checked" PropertyNameExpanded PropertyName = "expanded" PropertyNameModal PropertyName = "modal" PropertyNamePressed PropertyName = "pressed" PropertyNameSelected PropertyName = "selected" PropertyNameActivedescendant PropertyName = "activedescendant" PropertyNameControls PropertyName = "controls" PropertyNameDescribedby PropertyName = "describedby" PropertyNameDetails PropertyName = "details" PropertyNameErrormessage PropertyName = "errormessage" PropertyNameFlowto PropertyName = "flowto" PropertyNameLabelledby PropertyName = "labelledby" PropertyNameOwns PropertyName = "owns" PropertyNameURL PropertyName = "url" PropertyNameActiveFullscreenElement PropertyName = "activeFullscreenElement" PropertyNameActiveModalDialog PropertyName = "activeModalDialog" PropertyNameActiveAriaModalDialog PropertyName = "activeAriaModalDialog" PropertyNameAriaHiddenElement PropertyName = "ariaHiddenElement" PropertyNameAriaHiddenSubtree PropertyName = "ariaHiddenSubtree" PropertyNameEmptyAlt PropertyName = "emptyAlt" PropertyNameEmptyText PropertyName = "emptyText" PropertyNameInertElement PropertyName = "inertElement" PropertyNameInertSubtree PropertyName = "inertSubtree" PropertyNameLabelContainer PropertyName = "labelContainer" PropertyNameLabelFor PropertyName = "labelFor" PropertyNameNotRendered PropertyName = "notRendered" PropertyNameNotVisible PropertyName = "notVisible" PropertyNamePresentationalRole PropertyName = "presentationalRole" PropertyNameProbablyPresentational PropertyName = "probablyPresentational" PropertyNameInactiveCarouselTabContent PropertyName = "inactiveCarouselTabContent" PropertyNameUninteresting PropertyName = "uninteresting" )
PropertyName values.
func (PropertyName) String ¶
func (t PropertyName) String() string
String returns the PropertyName as string value.
type QueryAXTreeParams ¶
type QueryAXTreeParams struct {
NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Identifier of the node for the root to query.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node for the root to query.
ObjectID runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"` // JavaScript object id of the node wrapper for the root to query.
AccessibleName string `json:"accessibleName,omitempty,omitzero"` // Find nodes with this computed name.
Role string `json:"role,omitempty,omitzero"` // Find nodes with this computed role.
}
QueryAXTreeParams are the parameters of the command Accessibility.queryAXTree.
type QueryAXTreeResult ¶ added in v0.157.3
type QueryAXTreeResult struct {
Nodes []*Node `json:"nodes,omitempty,omitzero"` // A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility.
}
QueryAXTreeResult is the result of the command Accessibility.queryAXTree.
type RelatedNode ¶
type RelatedNode struct {
BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId"` // The BackendNodeId of the related DOM node.
Idref string `json:"idref,omitempty,omitzero"` // The IDRef value provided, if any.
Text string `json:"text,omitempty,omitzero"` // The text alternative of this node in the current context.
}
RelatedNode [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXRelatedNode
type Value ¶
type Value struct {
Type ValueType `json:"type"` // The type of this value.
Value jsonv2.Value `json:"value,omitempty,omitzero"` // The computed value of this property.
RelatedNodes []*RelatedNode `json:"relatedNodes,omitempty,omitzero"` // One or more related nodes, if applicable.
Sources []*ValueSource `json:"sources,omitempty,omitzero"` // The sources which contributed to the computation of this property.
}
Value a single computed AX property.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValue
type ValueNativeSourceType ¶
type ValueNativeSourceType string
ValueNativeSourceType enum of possible native property sources (as a subtype of a particular AXValueSourceType).
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueNativeSourceType
const ( ValueNativeSourceTypeDescription ValueNativeSourceType = "description" ValueNativeSourceTypeFigcaption ValueNativeSourceType = "figcaption" ValueNativeSourceTypeLabel ValueNativeSourceType = "label" ValueNativeSourceTypeLabelfor ValueNativeSourceType = "labelfor" ValueNativeSourceTypeLabelwrapped ValueNativeSourceType = "labelwrapped" ValueNativeSourceTypeLegend ValueNativeSourceType = "legend" ValueNativeSourceTypeRubyannotation ValueNativeSourceType = "rubyannotation" ValueNativeSourceTypeTablecaption ValueNativeSourceType = "tablecaption" ValueNativeSourceTypeTitle ValueNativeSourceType = "title" ValueNativeSourceTypeOther ValueNativeSourceType = "other" )
ValueNativeSourceType values.
func (ValueNativeSourceType) String ¶
func (t ValueNativeSourceType) String() string
String returns the ValueNativeSourceType as string value.
type ValueSource ¶
type ValueSource struct {
Type ValueSourceType `json:"type"` // What type of source this is.
Value *Value `json:"value,omitempty,omitzero"` // The value of this property source.
Attribute string `json:"attribute,omitempty,omitzero"` // The name of the relevant attribute, if any.
AttributeValue *Value `json:"attributeValue,omitempty,omitzero"` // The value of the relevant attribute, if any.
Superseded bool `json:"superseded"` // Whether this source is superseded by a higher priority source.
NativeSource ValueNativeSourceType `json:"nativeSource,omitempty,omitzero"` // The native markup source for this value, e.g. a <label> element.
NativeSourceValue *Value `json:"nativeSourceValue,omitempty,omitzero"` // The value, such as a node or node list, of the native source.
Invalid bool `json:"invalid"` // Whether the value for this property is invalid.
InvalidReason string `json:"invalidReason,omitempty,omitzero"` // Reason for the value being invalid, if it is.
}
ValueSource a single source for a computed AX property.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSource
type ValueSourceType ¶
type ValueSourceType string
ValueSourceType enum of possible property sources.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSourceType
const ( ValueSourceTypeAttribute ValueSourceType = "attribute" ValueSourceTypeImplicit ValueSourceType = "implicit" ValueSourceTypeStyle ValueSourceType = "style" ValueSourceTypeContents ValueSourceType = "contents" ValueSourceTypePlaceholder ValueSourceType = "placeholder" ValueSourceTypeRelatedElement ValueSourceType = "relatedElement" )
ValueSourceType values.
func (ValueSourceType) String ¶
func (t ValueSourceType) String() string
String returns the ValueSourceType as string value.
type ValueType ¶
type ValueType string
ValueType enum of possible property types.
See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueType
const ( ValueTypeBoolean ValueType = "boolean" ValueTypeTristate ValueType = "tristate" ValueTypeBooleanOrUndefined ValueType = "booleanOrUndefined" ValueTypeIdref ValueType = "idref" ValueTypeIdrefList ValueType = "idrefList" ValueTypeInteger ValueType = "integer" ValueTypeNode ValueType = "node" ValueTypeNodeList ValueType = "nodeList" ValueTypeNumber ValueType = "number" ValueTypeString ValueType = "string" ValueTypeComputedString ValueType = "computedString" ValueTypeToken ValueType = "token" ValueTypeTokenList ValueType = "tokenList" ValueTypeDomRelation ValueType = "domRelation" ValueTypeRole ValueType = "role" ValueTypeInternalRole ValueType = "internalRole" ValueTypeValueUndefined ValueType = "valueUndefined" )
ValueType values.