accessibility

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package accessibility implements the Accessibility domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Accessibility domain with the connection set to conn.

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

AXNode A node in the accessibility tree.

type AXNodeID

type AXNodeID string

AXNodeID Unique accessibility node identifier.

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"
	AXPropertyNameHidden           AXPropertyName = "hidden"
	AXPropertyNameHiddenRoot       AXPropertyName = "hiddenRoot"
	AXPropertyNameInvalid          AXPropertyName = "invalid"
	AXPropertyNameKeyshortcuts     AXPropertyName = "keyshortcuts"
	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"
)

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 = ""
	AXValueNativeSourceTypeFigcaption   AXValueNativeSourceType = "figcaption"
	AXValueNativeSourceTypeLabel        AXValueNativeSourceType = "label"
	AXValueNativeSourceTypeLabelfor     AXValueNativeSourceType = "labelfor"
	AXValueNativeSourceTypeLabelwrapped AXValueNativeSourceType = "labelwrapped"
	AXValueNativeSourceTypeLegend       AXValueNativeSourceType = "legend"
	AXValueNativeSourceTypeTablecaption AXValueNativeSourceType = "tablecaption"
	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 GetPartialAXTreeArgs

type GetPartialAXTreeArgs struct {
	NodeID         dom.NodeID `json:"nodeId"`                   // ID of node to get the partial accessibility tree for.
	FetchRelatives *bool      `json:"fetchRelatives,omitempty"` // Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
}

GetPartialAXTreeArgs represents the arguments for GetPartialAXTree in the Accessibility domain.

func NewGetPartialAXTreeArgs

func NewGetPartialAXTreeArgs(nodeID dom.NodeID) *GetPartialAXTreeArgs

NewGetPartialAXTreeArgs initializes GetPartialAXTreeArgs with the required arguments.

func (*GetPartialAXTreeArgs) SetFetchRelatives

func (a *GetPartialAXTreeArgs) SetFetchRelatives(fetchRelatives bool) *GetPartialAXTreeArgs

SetFetchRelatives sets the FetchRelatives optional argument. Whether to fetch this nodes ancestors, siblings and children. Defaults to true.

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.

Jump to

Keyboard shortcuts

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