Documentation ¶
Overview ¶
Package accessibility implements the Accessibility domain.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type AXNode
- type AXNodeID
- type AXProperty
- type AXPropertyName
- type AXRelatedNode
- type AXValue
- type AXValueNativeSourceType
- type AXValueSource
- type AXValueSourceType
- type AXValueType
- type GetAXNodeAndAncestorsArgs
- func (a *GetAXNodeAndAncestorsArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *GetAXNodeAndAncestorsArgs
- func (a *GetAXNodeAndAncestorsArgs) SetNodeID(nodeID dom.NodeID) *GetAXNodeAndAncestorsArgs
- func (a *GetAXNodeAndAncestorsArgs) SetObjectID(objectID runtime.RemoteObjectID) *GetAXNodeAndAncestorsArgs
- type GetAXNodeAndAncestorsReply
- type GetChildAXNodesArgs
- type GetChildAXNodesReply
- type GetFullAXTreeArgs
- type GetFullAXTreeReply
- type GetPartialAXTreeArgs
- func (a *GetPartialAXTreeArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *GetPartialAXTreeArgs
- func (a *GetPartialAXTreeArgs) SetFetchRelatives(fetchRelatives bool) *GetPartialAXTreeArgs
- func (a *GetPartialAXTreeArgs) SetNodeID(nodeID dom.NodeID) *GetPartialAXTreeArgs
- func (a *GetPartialAXTreeArgs) SetObjectID(objectID runtime.RemoteObjectID) *GetPartialAXTreeArgs
- type GetPartialAXTreeReply
- type GetRootAXNodeArgs
- type GetRootAXNodeReply
- type LoadCompleteClient
- type LoadCompleteReply
- type NodesUpdatedClient
- type NodesUpdatedReply
- type QueryAXTreeArgs
- func (a *QueryAXTreeArgs) SetAccessibleName(accessibleName string) *QueryAXTreeArgs
- func (a *QueryAXTreeArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *QueryAXTreeArgs
- func (a *QueryAXTreeArgs) SetNodeID(nodeID dom.NodeID) *QueryAXTreeArgs
- func (a *QueryAXTreeArgs) SetObjectID(objectID runtime.RemoteObjectID) *QueryAXTreeArgs
- func (a *QueryAXTreeArgs) SetRole(role string) *QueryAXTreeArgs
- type QueryAXTreeReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AXNode ¶
type AXNode struct { NodeID AXNodeID `json:"nodeId"` // Unique identifier for this node. Ignored bool `json:"ignored"` // Whether this node is ignored for accessibility IgnoredReasons []AXProperty `json:"ignoredReasons,omitempty"` // Collection of reasons why this node is hidden. Role *AXValue `json:"role,omitempty"` // This `Node`'s role, whether explicit or implicit. ChromeRole *AXValue `json:"chromeRole,omitempty"` // This `Node`'s Chrome raw role. Name *AXValue `json:"name,omitempty"` // The accessible name for this `Node`. Description *AXValue `json:"description,omitempty"` // The accessible description for this `Node`. Value *AXValue `json:"value,omitempty"` // The value for this `Node`. Properties []AXProperty `json:"properties,omitempty"` // All other properties ParentID *AXNodeID `json:"parentId,omitempty"` // ID for this node's parent. ChildIDs []AXNodeID `json:"childIds,omitempty"` // IDs for each of this node's child nodes. BackendDOMNodeID *dom.BackendNodeID `json:"backendDOMNodeId,omitempty"` // The backend ID for the associated DOM node, if any. FrameID *page.FrameID `json:"frameId,omitempty"` // The frame ID for the frame associated with this nodes document. }
AXNode A node in the accessibility tree.
type AXProperty ¶
type AXProperty struct { Name AXPropertyName `json:"name"` // The name of this property. Value AXValue `json:"value"` // The value of this property. }
AXProperty
type AXPropertyName ¶ added in v0.14.2
type AXPropertyName string
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.
const ( AXPropertyNameNotSet AXPropertyName = "" AXPropertyNameBusy AXPropertyName = "busy" AXPropertyNameDisabled AXPropertyName = "disabled" AXPropertyNameEditable AXPropertyName = "editable" AXPropertyNameFocusable AXPropertyName = "focusable" AXPropertyNameFocused AXPropertyName = "focused" AXPropertyNameHidden AXPropertyName = "hidden" AXPropertyNameHiddenRoot AXPropertyName = "hiddenRoot" AXPropertyNameInvalid AXPropertyName = "invalid" AXPropertyNameKeyshortcuts AXPropertyName = "keyshortcuts" AXPropertyNameSettable AXPropertyName = "settable" AXPropertyNameRoledescription AXPropertyName = "roledescription" AXPropertyNameLive AXPropertyName = "live" AXPropertyNameAtomic AXPropertyName = "atomic" AXPropertyNameRelevant AXPropertyName = "relevant" AXPropertyNameRoot AXPropertyName = "root" AXPropertyNameAutocomplete AXPropertyName = "autocomplete" AXPropertyNameHasPopup AXPropertyName = "hasPopup" AXPropertyNameLevel AXPropertyName = "level" AXPropertyNameMultiselectable AXPropertyName = "multiselectable" AXPropertyNameOrientation AXPropertyName = "orientation" AXPropertyNameMultiline AXPropertyName = "multiline" AXPropertyNameReadonly AXPropertyName = "readonly" AXPropertyNameRequired AXPropertyName = "required" AXPropertyNameValuemin AXPropertyName = "valuemin" AXPropertyNameValuemax AXPropertyName = "valuemax" AXPropertyNameValuetext AXPropertyName = "valuetext" AXPropertyNameChecked AXPropertyName = "checked" AXPropertyNameExpanded AXPropertyName = "expanded" AXPropertyNameModal AXPropertyName = "modal" AXPropertyNamePressed AXPropertyName = "pressed" AXPropertyNameSelected AXPropertyName = "selected" AXPropertyNameActivedescendant AXPropertyName = "activedescendant" AXPropertyNameControls AXPropertyName = "controls" AXPropertyNameDescribedby AXPropertyName = "describedby" AXPropertyNameDetails AXPropertyName = "details" AXPropertyNameErrormessage AXPropertyName = "errormessage" AXPropertyNameFlowto AXPropertyName = "flowto" AXPropertyNameLabelledby AXPropertyName = "labelledby" AXPropertyNameOwns AXPropertyName = "owns" AXPropertyNameURL AXPropertyName = "url" )
AXPropertyName as enums.
func (AXPropertyName) String ¶ added in v0.14.2
func (e AXPropertyName) String() string
func (AXPropertyName) Valid ¶ added in v0.14.2
func (e AXPropertyName) Valid() bool
type AXRelatedNode ¶
type AXRelatedNode struct { BackendDOMNodeID dom.BackendNodeID `json:"backendDOMNodeId"` // The BackendNodeId of the related DOM node. IDRef *string `json:"idref,omitempty"` // The IDRef value provided, if any. Text *string `json:"text,omitempty"` // The text alternative of this node in the current context. }
AXRelatedNode
type AXValue ¶
type AXValue struct { Type AXValueType `json:"type"` // The type of this value. Value json.RawMessage `json:"value,omitempty"` // The computed value of this property. RelatedNodes []AXRelatedNode `json:"relatedNodes,omitempty"` // One or more related nodes, if applicable. Sources []AXValueSource `json:"sources,omitempty"` // The sources which contributed to the computation of this property. }
AXValue A single computed AX property.
type AXValueNativeSourceType ¶
type AXValueNativeSourceType string
AXValueNativeSourceType Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
const ( AXValueNativeSourceTypeNotSet AXValueNativeSourceType = "" AXValueNativeSourceTypeDescription AXValueNativeSourceType = "description" AXValueNativeSourceTypeLabel AXValueNativeSourceType = "label" AXValueNativeSourceTypeLabelfor AXValueNativeSourceType = "labelfor" AXValueNativeSourceTypeLabelwrapped AXValueNativeSourceType = "labelwrapped" AXValueNativeSourceTypeLegend AXValueNativeSourceType = "legend" AXValueNativeSourceTypeRubyannotation AXValueNativeSourceType = "rubyannotation" AXValueNativeSourceTypeTitle AXValueNativeSourceType = "title" AXValueNativeSourceTypeOther AXValueNativeSourceType = "other" )
AXValueNativeSourceType as enums.
func (AXValueNativeSourceType) String ¶
func (e AXValueNativeSourceType) String() string
func (AXValueNativeSourceType) Valid ¶
func (e AXValueNativeSourceType) Valid() bool
type AXValueSource ¶
type AXValueSource struct { Type AXValueSourceType `json:"type"` // What type of source this is. Value *AXValue `json:"value,omitempty"` // The value of this property source. Attribute *string `json:"attribute,omitempty"` // The name of the relevant attribute, if any. AttributeValue *AXValue `json:"attributeValue,omitempty"` // The value of the relevant attribute, if any. Superseded *bool `json:"superseded,omitempty"` // Whether this source is superseded by a higher priority source. NativeSource AXValueNativeSourceType `json:"nativeSource,omitempty"` // The native markup source for this value, e.g. a `<label>` element. NativeSourceValue *AXValue `json:"nativeSourceValue,omitempty"` // The value, such as a node or node list, of the native source. Invalid *bool `json:"invalid,omitempty"` // Whether the value for this property is invalid. InvalidReason *string `json:"invalidReason,omitempty"` // Reason for the value being invalid, if it is. }
AXValueSource A single source for a computed AX property.
type AXValueSourceType ¶
type AXValueSourceType string
AXValueSourceType Enum of possible property sources.
const ( AXValueSourceTypeNotSet AXValueSourceType = "" AXValueSourceTypeAttribute AXValueSourceType = "attribute" AXValueSourceTypeImplicit AXValueSourceType = "implicit" AXValueSourceTypeStyle AXValueSourceType = "style" AXValueSourceTypeContents AXValueSourceType = "contents" AXValueSourceTypePlaceholder AXValueSourceType = "placeholder" AXValueSourceTypeRelatedElement AXValueSourceType = "relatedElement" )
AXValueSourceType as enums.
func (AXValueSourceType) String ¶
func (e AXValueSourceType) String() string
func (AXValueSourceType) Valid ¶
func (e AXValueSourceType) Valid() bool
type AXValueType ¶
type AXValueType string
AXValueType Enum of possible property types.
const ( AXValueTypeNotSet AXValueType = "" AXValueTypeBoolean AXValueType = "boolean" AXValueTypeTristate AXValueType = "tristate" AXValueTypeBooleanOrUndefined AXValueType = "booleanOrUndefined" AXValueTypeIDRef AXValueType = "idref" AXValueTypeIDRefList AXValueType = "idrefList" AXValueTypeInteger AXValueType = "integer" AXValueTypeNode AXValueType = "node" AXValueTypeNodeList AXValueType = "nodeList" AXValueTypeNumber AXValueType = "number" AXValueTypeString AXValueType = "string" AXValueTypeComputedString AXValueType = "computedString" AXValueTypeToken AXValueType = "token" AXValueTypeTokenList AXValueType = "tokenList" AXValueTypeDOMRelation AXValueType = "domRelation" AXValueTypeRole AXValueType = "role" AXValueTypeInternalRole AXValueType = "internalRole" AXValueTypeValueUndefined AXValueType = "valueUndefined" )
AXValueType as enums.
func (AXValueType) String ¶
func (e AXValueType) String() string
func (AXValueType) Valid ¶
func (e AXValueType) Valid() bool
type GetAXNodeAndAncestorsArgs ¶ added in v0.33.0
type GetAXNodeAndAncestorsArgs struct { NodeID *dom.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get. BackendNodeID *dom.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get. }
GetAXNodeAndAncestorsArgs represents the arguments for GetAXNodeAndAncestors in the Accessibility domain.
func NewGetAXNodeAndAncestorsArgs ¶ added in v0.33.0
func NewGetAXNodeAndAncestorsArgs() *GetAXNodeAndAncestorsArgs
NewGetAXNodeAndAncestorsArgs initializes GetAXNodeAndAncestorsArgs with the required arguments.
func (*GetAXNodeAndAncestorsArgs) SetBackendNodeID ¶ added in v0.33.0
func (a *GetAXNodeAndAncestorsArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *GetAXNodeAndAncestorsArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node to get.
func (*GetAXNodeAndAncestorsArgs) SetNodeID ¶ added in v0.33.0
func (a *GetAXNodeAndAncestorsArgs) SetNodeID(nodeID dom.NodeID) *GetAXNodeAndAncestorsArgs
SetNodeID sets the NodeID optional argument. Identifier of the node to get.
func (*GetAXNodeAndAncestorsArgs) SetObjectID ¶ added in v0.33.0
func (a *GetAXNodeAndAncestorsArgs) SetObjectID(objectID runtime.RemoteObjectID) *GetAXNodeAndAncestorsArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper to get.
type GetAXNodeAndAncestorsReply ¶ added in v0.33.0
type GetAXNodeAndAncestorsReply struct {
Nodes []AXNode `json:"nodes"` // No description.
}
GetAXNodeAndAncestorsReply represents the return values for GetAXNodeAndAncestors in the Accessibility domain.
type GetChildAXNodesArgs ¶ added in v0.31.0
type GetChildAXNodesArgs struct { ID AXNodeID `json:"id"` // No description. FrameID *page.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used. }
GetChildAXNodesArgs represents the arguments for GetChildAXNodes in the Accessibility domain.
func NewGetChildAXNodesArgs ¶ added in v0.31.0
func NewGetChildAXNodesArgs(id AXNodeID) *GetChildAXNodesArgs
NewGetChildAXNodesArgs initializes GetChildAXNodesArgs with the required arguments.
func (*GetChildAXNodesArgs) SetFrameID ¶ added in v0.33.0
func (a *GetChildAXNodesArgs) SetFrameID(frameID page.FrameID) *GetChildAXNodesArgs
SetFrameID sets the FrameID optional argument. The frame in whose document the node resides. If omitted, the root frame is used.
type GetChildAXNodesReply ¶ added in v0.31.0
type GetChildAXNodesReply struct {
Nodes []AXNode `json:"nodes"` // No description.
}
GetChildAXNodesReply represents the return values for GetChildAXNodes in the Accessibility domain.
type GetFullAXTreeArgs ¶ added in v0.31.0
type GetFullAXTreeArgs struct { Depth *int `json:"depth,omitempty"` // The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned. FrameID *page.FrameID `json:"frameId,omitempty"` // The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used. }
GetFullAXTreeArgs represents the arguments for GetFullAXTree in the Accessibility domain.
func NewGetFullAXTreeArgs ¶ added in v0.31.0
func NewGetFullAXTreeArgs() *GetFullAXTreeArgs
NewGetFullAXTreeArgs initializes GetFullAXTreeArgs with the required arguments.
func (*GetFullAXTreeArgs) SetDepth ¶ added in v0.33.0
func (a *GetFullAXTreeArgs) SetDepth(depth int) *GetFullAXTreeArgs
SetDepth sets the Depth optional argument. The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
func (*GetFullAXTreeArgs) SetFrameID ¶ added in v0.33.0
func (a *GetFullAXTreeArgs) SetFrameID(frameID page.FrameID) *GetFullAXTreeArgs
SetFrameID sets the FrameID optional argument. The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.
type GetFullAXTreeReply ¶ added in v0.19.1
type GetFullAXTreeReply struct {
Nodes []AXNode `json:"nodes"` // No description.
}
GetFullAXTreeReply represents the return values for GetFullAXTree in the Accessibility domain.
type GetPartialAXTreeArgs ¶
type GetPartialAXTreeArgs struct { NodeID *dom.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get the partial accessibility tree for. BackendNodeID *dom.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get the partial accessibility tree for. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get the partial accessibility tree for. FetchRelatives *bool `json:"fetchRelatives,omitempty"` // Whether to fetch this node's ancestors, siblings and children. Defaults to true. }
GetPartialAXTreeArgs represents the arguments for GetPartialAXTree in the Accessibility domain.
func NewGetPartialAXTreeArgs ¶
func NewGetPartialAXTreeArgs() *GetPartialAXTreeArgs
NewGetPartialAXTreeArgs initializes GetPartialAXTreeArgs with the required arguments.
func (*GetPartialAXTreeArgs) SetBackendNodeID ¶ added in v0.18.1
func (a *GetPartialAXTreeArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *GetPartialAXTreeArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node to get the partial accessibility tree for.
func (*GetPartialAXTreeArgs) SetFetchRelatives ¶
func (a *GetPartialAXTreeArgs) SetFetchRelatives(fetchRelatives bool) *GetPartialAXTreeArgs
SetFetchRelatives sets the FetchRelatives optional argument. Whether to fetch this node's ancestors, siblings and children. Defaults to true.
func (*GetPartialAXTreeArgs) SetNodeID ¶ added in v0.18.1
func (a *GetPartialAXTreeArgs) SetNodeID(nodeID dom.NodeID) *GetPartialAXTreeArgs
SetNodeID sets the NodeID optional argument. Identifier of the node to get the partial accessibility tree for.
func (*GetPartialAXTreeArgs) SetObjectID ¶ added in v0.18.1
func (a *GetPartialAXTreeArgs) SetObjectID(objectID runtime.RemoteObjectID) *GetPartialAXTreeArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper to get the partial accessibility tree for.
type GetPartialAXTreeReply ¶
type GetPartialAXTreeReply struct {
Nodes []AXNode `json:"nodes"` // The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
}
GetPartialAXTreeReply represents the return values for GetPartialAXTree in the Accessibility domain.
type GetRootAXNodeArgs ¶ added in v0.33.0
type GetRootAXNodeArgs struct {
FrameID *page.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used.
}
GetRootAXNodeArgs represents the arguments for GetRootAXNode in the Accessibility domain.
func NewGetRootAXNodeArgs ¶ added in v0.33.0
func NewGetRootAXNodeArgs() *GetRootAXNodeArgs
NewGetRootAXNodeArgs initializes GetRootAXNodeArgs with the required arguments.
func (*GetRootAXNodeArgs) SetFrameID ¶ added in v0.33.0
func (a *GetRootAXNodeArgs) SetFrameID(frameID page.FrameID) *GetRootAXNodeArgs
SetFrameID sets the FrameID optional argument. The frame in whose document the node resides. If omitted, the root frame is used.
type GetRootAXNodeReply ¶ added in v0.33.0
type GetRootAXNodeReply struct {
Node AXNode `json:"node"` // No description.
}
GetRootAXNodeReply represents the return values for GetRootAXNode in the Accessibility domain.
type LoadCompleteClient ¶ added in v0.33.0
type LoadCompleteClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*LoadCompleteReply, error) rpcc.Stream }
LoadCompleteClient is a client for LoadComplete events. The loadComplete event mirrors the load complete event sent by the browser to assistive technology when the web page has finished loading.
type LoadCompleteReply ¶ added in v0.33.0
type LoadCompleteReply struct {
Root AXNode `json:"root"` // New document root node.
}
LoadCompleteReply is the reply for LoadComplete events.
type NodesUpdatedClient ¶ added in v0.33.0
type NodesUpdatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*NodesUpdatedReply, error) rpcc.Stream }
NodesUpdatedClient is a client for NodesUpdated events. The nodesUpdated event is sent every time a previously requested node has changed the in tree.
type NodesUpdatedReply ¶ added in v0.33.0
type NodesUpdatedReply struct {
Nodes []AXNode `json:"nodes"` // Updated node data.
}
NodesUpdatedReply is the reply for NodesUpdated events.
type QueryAXTreeArgs ¶ added in v0.31.0
type QueryAXTreeArgs struct { NodeID *dom.NodeID `json:"nodeId,omitempty"` // Identifier of the node for the root to query. BackendNodeID *dom.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node for the root to query. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper for the root to query. AccessibleName *string `json:"accessibleName,omitempty"` // Find nodes with this computed name. Role *string `json:"role,omitempty"` // Find nodes with this computed role. }
QueryAXTreeArgs represents the arguments for QueryAXTree in the Accessibility domain.
func NewQueryAXTreeArgs ¶ added in v0.31.0
func NewQueryAXTreeArgs() *QueryAXTreeArgs
NewQueryAXTreeArgs initializes QueryAXTreeArgs with the required arguments.
func (*QueryAXTreeArgs) SetAccessibleName ¶ added in v0.31.0
func (a *QueryAXTreeArgs) SetAccessibleName(accessibleName string) *QueryAXTreeArgs
SetAccessibleName sets the AccessibleName optional argument. Find nodes with this computed name.
func (*QueryAXTreeArgs) SetBackendNodeID ¶ added in v0.31.0
func (a *QueryAXTreeArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *QueryAXTreeArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node for the root to query.
func (*QueryAXTreeArgs) SetNodeID ¶ added in v0.31.0
func (a *QueryAXTreeArgs) SetNodeID(nodeID dom.NodeID) *QueryAXTreeArgs
SetNodeID sets the NodeID optional argument. Identifier of the node for the root to query.
func (*QueryAXTreeArgs) SetObjectID ¶ added in v0.31.0
func (a *QueryAXTreeArgs) SetObjectID(objectID runtime.RemoteObjectID) *QueryAXTreeArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node wrapper for the root to query.
func (*QueryAXTreeArgs) SetRole ¶ added in v0.31.0
func (a *QueryAXTreeArgs) SetRole(role string) *QueryAXTreeArgs
SetRole sets the Role optional argument. Find nodes with this computed role.
type QueryAXTreeReply ¶ added in v0.31.0
type QueryAXTreeReply struct {
Nodes []AXNode `json:"nodes"` // A list of `Accessibility.AXNode` matching the specified attributes, including nodes that are ignored for accessibility.
}
QueryAXTreeReply represents the return values for QueryAXTree in the Accessibility domain.