accessibility

package
v0.0.0-...-c16d098 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 8 Imported by: 4

Documentation

Overview

Package accessibility provides the Chrome DevTools Protocol commands, types, and events for the Accessibility domain.

Generated by the cdproto-gen command.

Index

Constants

View Source
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

This section is empty.

Functions

This section is empty.

Types

type DisableParams

type DisableParams struct{}

DisableParams disables the accessibility domain.

func Disable

func Disable() *DisableParams

Disable disables the accessibility domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-disable

func (*DisableParams) Do

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes Accessibility.disable against the provided context.

func (DisableParams) MarshalEasyJSON

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct{}

EnableParams 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.

func Enable

func Enable() *EnableParams

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

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes Accessibility.enable against the provided context.

func (EnableParams) MarshalEasyJSON

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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

func (EventLoadComplete) MarshalEasyJSON

func (v EventLoadComplete) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventLoadComplete) MarshalJSON

func (v EventLoadComplete) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventLoadComplete) UnmarshalEasyJSON

func (v *EventLoadComplete) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventLoadComplete) UnmarshalJSON

func (v *EventLoadComplete) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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

func (EventNodesUpdated) MarshalEasyJSON

func (v EventNodesUpdated) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventNodesUpdated) MarshalJSON

func (v EventNodesUpdated) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventNodesUpdated) UnmarshalEasyJSON

func (v *EventNodesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventNodesUpdated) UnmarshalJSON

func (v *EventNodesUpdated) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetAXNodeAndAncestorsParams

type GetAXNodeAndAncestorsParams struct {
	NodeID        cdp.NodeID             `json:"nodeId,omitempty"`        // Identifier of the node to get.
	BackendNodeID cdp.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.
}

GetAXNodeAndAncestorsParams fetches a node and all ancestors up to and including the root. Requires enable() to have been called previously.

func GetAXNodeAndAncestors

func GetAXNodeAndAncestors() *GetAXNodeAndAncestorsParams

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

parameters:

func (*GetAXNodeAndAncestorsParams) Do

func (p *GetAXNodeAndAncestorsParams) Do(ctx context.Context) (nodes []*Node, err error)

Do executes Accessibility.getAXNodeAndAncestors against the provided context.

returns:

nodes

func (GetAXNodeAndAncestorsParams) MarshalEasyJSON

func (v GetAXNodeAndAncestorsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetAXNodeAndAncestorsParams) MarshalJSON

func (v GetAXNodeAndAncestorsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetAXNodeAndAncestorsParams) UnmarshalEasyJSON

func (v *GetAXNodeAndAncestorsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetAXNodeAndAncestorsParams) UnmarshalJSON

func (v *GetAXNodeAndAncestorsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (GetAXNodeAndAncestorsParams) WithBackendNodeID

func (p GetAXNodeAndAncestorsParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetAXNodeAndAncestorsParams

WithBackendNodeID identifier of the backend node to get.

func (GetAXNodeAndAncestorsParams) WithNodeID

WithNodeID identifier of the node to get.

func (GetAXNodeAndAncestorsParams) WithObjectID

WithObjectID JavaScript object id of the node wrapper to get.

type GetAXNodeAndAncestorsReturns

type GetAXNodeAndAncestorsReturns struct {
	Nodes []*Node `json:"nodes,omitempty"`
}

GetAXNodeAndAncestorsReturns return values.

func (GetAXNodeAndAncestorsReturns) MarshalEasyJSON

func (v GetAXNodeAndAncestorsReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetAXNodeAndAncestorsReturns) MarshalJSON

func (v GetAXNodeAndAncestorsReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetAXNodeAndAncestorsReturns) UnmarshalEasyJSON

func (v *GetAXNodeAndAncestorsReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetAXNodeAndAncestorsReturns) UnmarshalJSON

func (v *GetAXNodeAndAncestorsReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetChildAXNodesParams

type GetChildAXNodesParams struct {
	ID      NodeID      `json:"id"`
	FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used.
}

GetChildAXNodesParams fetches a particular accessibility node by AXNodeId. Requires enable() to have been called previously.

func GetChildAXNodes

func GetChildAXNodes(id NodeID) *GetChildAXNodesParams

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

parameters:

id

func (*GetChildAXNodesParams) Do

func (p *GetChildAXNodesParams) Do(ctx context.Context) (nodes []*Node, err error)

Do executes Accessibility.getChildAXNodes against the provided context.

returns:

nodes

func (GetChildAXNodesParams) MarshalEasyJSON

func (v GetChildAXNodesParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetChildAXNodesParams) MarshalJSON

func (v GetChildAXNodesParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetChildAXNodesParams) UnmarshalEasyJSON

func (v *GetChildAXNodesParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetChildAXNodesParams) UnmarshalJSON

func (v *GetChildAXNodesParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (GetChildAXNodesParams) WithFrameID

func (p GetChildAXNodesParams) WithFrameID(frameID cdp.FrameID) *GetChildAXNodesParams

WithFrameID the frame in whose document the node resides. If omitted, the root frame is used.

type GetChildAXNodesReturns

type GetChildAXNodesReturns struct {
	Nodes []*Node `json:"nodes,omitempty"`
}

GetChildAXNodesReturns return values.

func (GetChildAXNodesReturns) MarshalEasyJSON

func (v GetChildAXNodesReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetChildAXNodesReturns) MarshalJSON

func (v GetChildAXNodesReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetChildAXNodesReturns) UnmarshalEasyJSON

func (v *GetChildAXNodesReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetChildAXNodesReturns) UnmarshalJSON

func (v *GetChildAXNodesReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetFullAXTreeParams

type GetFullAXTreeParams struct {
	Depth   int64       `json:"depth,omitempty"`   // 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"` // The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.
}

GetFullAXTreeParams fetches the entire accessibility tree for the root Document.

func GetFullAXTree

func GetFullAXTree() *GetFullAXTreeParams

GetFullAXTree fetches the entire accessibility tree for the root Document.

See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getFullAXTree

parameters:

func (*GetFullAXTreeParams) Do

func (p *GetFullAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error)

Do executes Accessibility.getFullAXTree against the provided context.

returns:

nodes

func (GetFullAXTreeParams) MarshalEasyJSON

func (v GetFullAXTreeParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetFullAXTreeParams) MarshalJSON

func (v GetFullAXTreeParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetFullAXTreeParams) UnmarshalEasyJSON

func (v *GetFullAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetFullAXTreeParams) UnmarshalJSON

func (v *GetFullAXTreeParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (GetFullAXTreeParams) WithDepth

func (p GetFullAXTreeParams) WithDepth(depth int64) *GetFullAXTreeParams

WithDepth the maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.

func (GetFullAXTreeParams) WithFrameID

func (p GetFullAXTreeParams) WithFrameID(frameID cdp.FrameID) *GetFullAXTreeParams

WithFrameID the frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.

type GetFullAXTreeReturns

type GetFullAXTreeReturns struct {
	Nodes []*Node `json:"nodes,omitempty"`
}

GetFullAXTreeReturns return values.

func (GetFullAXTreeReturns) MarshalEasyJSON

func (v GetFullAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetFullAXTreeReturns) MarshalJSON

func (v GetFullAXTreeReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetFullAXTreeReturns) UnmarshalEasyJSON

func (v *GetFullAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetFullAXTreeReturns) UnmarshalJSON

func (v *GetFullAXTreeReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetPartialAXTreeParams

type GetPartialAXTreeParams struct {
	NodeID         cdp.NodeID             `json:"nodeId,omitempty"`         // Identifier of the node to get the partial accessibility tree for.
	BackendNodeID  cdp.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.
}

GetPartialAXTreeParams fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.

func GetPartialAXTree

func GetPartialAXTree() *GetPartialAXTreeParams

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

parameters:

func (*GetPartialAXTreeParams) Do

func (p *GetPartialAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error)

Do executes Accessibility.getPartialAXTree against the provided context.

returns:

nodes - The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.

func (GetPartialAXTreeParams) MarshalEasyJSON

func (v GetPartialAXTreeParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetPartialAXTreeParams) MarshalJSON

func (v GetPartialAXTreeParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetPartialAXTreeParams) UnmarshalEasyJSON

func (v *GetPartialAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetPartialAXTreeParams) UnmarshalJSON

func (v *GetPartialAXTreeParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (GetPartialAXTreeParams) WithBackendNodeID

func (p GetPartialAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetPartialAXTreeParams

WithBackendNodeID identifier of the backend node to get the partial accessibility tree for.

func (GetPartialAXTreeParams) WithFetchRelatives

func (p GetPartialAXTreeParams) WithFetchRelatives(fetchRelatives bool) *GetPartialAXTreeParams

WithFetchRelatives whether to fetch this node's ancestors, siblings and children. Defaults to true.

func (GetPartialAXTreeParams) WithNodeID

WithNodeID identifier of the node to get the partial accessibility tree for.

func (GetPartialAXTreeParams) WithObjectID

WithObjectID JavaScript object id of the node wrapper to get the partial accessibility tree for.

type GetPartialAXTreeReturns

type GetPartialAXTreeReturns struct {
	Nodes []*Node `json:"nodes,omitempty"` // The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
}

GetPartialAXTreeReturns return values.

func (GetPartialAXTreeReturns) MarshalEasyJSON

func (v GetPartialAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetPartialAXTreeReturns) MarshalJSON

func (v GetPartialAXTreeReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetPartialAXTreeReturns) UnmarshalEasyJSON

func (v *GetPartialAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetPartialAXTreeReturns) UnmarshalJSON

func (v *GetPartialAXTreeReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetRootAXNodeParams

type GetRootAXNodeParams struct {
	FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used.
}

GetRootAXNodeParams fetches the root node. Requires enable() to have been called previously.

func GetRootAXNode

func GetRootAXNode() *GetRootAXNodeParams

GetRootAXNode fetches the root node. Requires enable() to have been called previously.

See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getRootAXNode

parameters:

func (*GetRootAXNodeParams) Do

func (p *GetRootAXNodeParams) Do(ctx context.Context) (node *Node, err error)

Do executes Accessibility.getRootAXNode against the provided context.

returns:

node

func (GetRootAXNodeParams) MarshalEasyJSON

func (v GetRootAXNodeParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetRootAXNodeParams) MarshalJSON

func (v GetRootAXNodeParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetRootAXNodeParams) UnmarshalEasyJSON

func (v *GetRootAXNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetRootAXNodeParams) UnmarshalJSON

func (v *GetRootAXNodeParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (GetRootAXNodeParams) WithFrameID

func (p GetRootAXNodeParams) WithFrameID(frameID cdp.FrameID) *GetRootAXNodeParams

WithFrameID the frame in whose document the node resides. If omitted, the root frame is used.

type GetRootAXNodeReturns

type GetRootAXNodeReturns struct {
	Node *Node `json:"node,omitempty"`
}

GetRootAXNodeReturns return values.

func (GetRootAXNodeReturns) MarshalEasyJSON

func (v GetRootAXNodeReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetRootAXNodeReturns) MarshalJSON

func (v GetRootAXNodeReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetRootAXNodeReturns) UnmarshalEasyJSON

func (v *GetRootAXNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetRootAXNodeReturns) UnmarshalJSON

func (v *GetRootAXNodeReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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"`   // Collection of reasons why this node is hidden.
	Role             *Value            `json:"role,omitempty"`             // This Node's role, whether explicit or implicit.
	ChromeRole       *Value            `json:"chromeRole,omitempty"`       // This Node's Chrome raw role.
	Name             *Value            `json:"name,omitempty"`             // The accessible name for this Node.
	Description      *Value            `json:"description,omitempty"`      // The accessible description for this Node.
	Value            *Value            `json:"value,omitempty"`            // The value for this Node.
	Properties       []*Property       `json:"properties,omitempty"`       // All other properties
	ParentID         NodeID            `json:"parentId,omitempty"`         // ID for this node's parent.
	ChildIDs         []NodeID          `json:"childIds,omitempty"`         // IDs for each of this node's child nodes.
	BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId,omitempty"` // The backend ID for the associated DOM node, if any.
	FrameID          cdp.FrameID       `json:"frameId,omitempty"`          // 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

func (Node) MarshalEasyJSON

func (v Node) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Node) MarshalJSON

func (v Node) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Node) UnmarshalEasyJSON

func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Node) UnmarshalJSON

func (v *Node) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type NodeID

type NodeID string

NodeID unique accessibility node identifier.

See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXNodeId

func (NodeID) String

func (t NodeID) String() string

String returns the NodeID as string value.

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

func (Property) MarshalEasyJSON

func (v Property) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Property) MarshalJSON

func (v Property) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Property) UnmarshalEasyJSON

func (v *Property) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Property) UnmarshalJSON

func (v *Property) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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.

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"
)

PropertyName values.

func (PropertyName) MarshalEasyJSON

func (t PropertyName) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (PropertyName) MarshalJSON

func (t PropertyName) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (PropertyName) String

func (t PropertyName) String() string

String returns the PropertyName as string value.

func (*PropertyName) UnmarshalEasyJSON

func (t *PropertyName) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*PropertyName) UnmarshalJSON

func (t *PropertyName) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type QueryAXTreeParams

type QueryAXTreeParams struct {
	NodeID         cdp.NodeID             `json:"nodeId,omitempty"`         // Identifier of the node for the root to query.
	BackendNodeID  cdp.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.
}

QueryAXTreeParams 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.

func QueryAXTree

func QueryAXTree() *QueryAXTreeParams

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

parameters:

func (*QueryAXTreeParams) Do

func (p *QueryAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error)

Do executes Accessibility.queryAXTree against the provided context.

returns:

nodes - A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility.

func (QueryAXTreeParams) MarshalEasyJSON

func (v QueryAXTreeParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (QueryAXTreeParams) MarshalJSON

func (v QueryAXTreeParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*QueryAXTreeParams) UnmarshalEasyJSON

func (v *QueryAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*QueryAXTreeParams) UnmarshalJSON

func (v *QueryAXTreeParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (QueryAXTreeParams) WithAccessibleName

func (p QueryAXTreeParams) WithAccessibleName(accessibleName string) *QueryAXTreeParams

WithAccessibleName find nodes with this computed name.

func (QueryAXTreeParams) WithBackendNodeID

func (p QueryAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *QueryAXTreeParams

WithBackendNodeID identifier of the backend node for the root to query.

func (QueryAXTreeParams) WithNodeID

func (p QueryAXTreeParams) WithNodeID(nodeID cdp.NodeID) *QueryAXTreeParams

WithNodeID identifier of the node for the root to query.

func (QueryAXTreeParams) WithObjectID

func (p QueryAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *QueryAXTreeParams

WithObjectID JavaScript object id of the node wrapper for the root to query.

func (QueryAXTreeParams) WithRole

func (p QueryAXTreeParams) WithRole(role string) *QueryAXTreeParams

WithRole find nodes with this computed role.

type QueryAXTreeReturns

type QueryAXTreeReturns struct {
	Nodes []*Node `json:"nodes,omitempty"` // A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility.
}

QueryAXTreeReturns return values.

func (QueryAXTreeReturns) MarshalEasyJSON

func (v QueryAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (QueryAXTreeReturns) MarshalJSON

func (v QueryAXTreeReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*QueryAXTreeReturns) UnmarshalEasyJSON

func (v *QueryAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*QueryAXTreeReturns) UnmarshalJSON

func (v *QueryAXTreeReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RelatedNode

type RelatedNode struct {
	BackendDOMNodeID cdp.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.
}

RelatedNode [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXRelatedNode

func (RelatedNode) MarshalEasyJSON

func (v RelatedNode) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RelatedNode) MarshalJSON

func (v RelatedNode) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RelatedNode) UnmarshalEasyJSON

func (v *RelatedNode) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RelatedNode) UnmarshalJSON

func (v *RelatedNode) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Value

type Value struct {
	Type         ValueType           `json:"type"`                   // The type of this value.
	Value        easyjson.RawMessage `json:"value,omitempty"`        // The computed value of this property.
	RelatedNodes []*RelatedNode      `json:"relatedNodes,omitempty"` // One or more related nodes, if applicable.
	Sources      []*ValueSource      `json:"sources,omitempty"`      // 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

func (Value) MarshalEasyJSON

func (v Value) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Value) MarshalJSON

func (v Value) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Value) UnmarshalEasyJSON

func (v *Value) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Value) UnmarshalJSON

func (v *Value) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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) MarshalEasyJSON

func (t ValueNativeSourceType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (ValueNativeSourceType) MarshalJSON

func (t ValueNativeSourceType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (ValueNativeSourceType) String

func (t ValueNativeSourceType) String() string

String returns the ValueNativeSourceType as string value.

func (*ValueNativeSourceType) UnmarshalEasyJSON

func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*ValueNativeSourceType) UnmarshalJSON

func (t *ValueNativeSourceType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type ValueSource

type ValueSource struct {
	Type              ValueSourceType       `json:"type"`                        // What type of source this is.
	Value             *Value                `json:"value,omitempty"`             // The value of this property source.
	Attribute         string                `json:"attribute,omitempty"`         // The name of the relevant attribute, if any.
	AttributeValue    *Value                `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      ValueNativeSourceType `json:"nativeSource,omitempty"`      // The native markup source for this value, e.g. a <label> element.
	NativeSourceValue *Value                `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.
}

ValueSource a single source for a computed AX property.

See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSource

func (ValueSource) MarshalEasyJSON

func (v ValueSource) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ValueSource) MarshalJSON

func (v ValueSource) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ValueSource) UnmarshalEasyJSON

func (v *ValueSource) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ValueSource) UnmarshalJSON

func (v *ValueSource) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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) MarshalEasyJSON

func (t ValueSourceType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (ValueSourceType) MarshalJSON

func (t ValueSourceType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (ValueSourceType) String

func (t ValueSourceType) String() string

String returns the ValueSourceType as string value.

func (*ValueSourceType) UnmarshalEasyJSON

func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*ValueSourceType) UnmarshalJSON

func (t *ValueSourceType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

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.

func (ValueType) MarshalEasyJSON

func (t ValueType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (ValueType) MarshalJSON

func (t ValueType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (ValueType) String

func (t ValueType) String() string

String returns the ValueType as string value.

func (*ValueType) UnmarshalEasyJSON

func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*ValueType) UnmarshalJSON

func (t *ValueType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL