accessibility

package
v1.0.185 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AXElementData added in v1.0.183

type AXElementData struct {
	PlatformElementValue string `json:"platformElementValue"` // Base64-encoded platform element data
	SpokenDescription    string `json:"spokenDescription"`    // Spoken description of the element
}

AXElementData represents the data returned from Move operations

type Action added in v1.0.183

type Action int
const (
	ActionTap Action = iota
)

type ControlInterface

type ControlInterface struct {
	// contains filtered or unexported fields
}

ControlInterface provides a simple interface to controlling the AX service on the device It only needs the global dtx channel as all AX methods are invoked on it.

func New

func New(device ios.DeviceEntry) (ControlInterface, error)

New creates and connects to the given device, a new ControlInterface instance

func NewWithoutEventChangeListeners added in v1.0.171

func NewWithoutEventChangeListeners(device ios.DeviceEntry) (ControlInterface, error)

NewWithoutEventChangeListeners creates and connects to the given device, a new ControlInterface instance without setting accessibility event change listeners to avoid keeping constant connection.

func (ControlInterface) EnableSelectionMode

func (a ControlInterface) EnableSelectionMode()

EnableSelectionMode enables the UI element selection mode on the device, it is the same as clicking the little crosshair in AX Inspector

func (ControlInterface) GetElement

func (a ControlInterface) GetElement(ctx context.Context) (AXElementData, error)

GetElement moves the green selection rectangle one element further

func (ControlInterface) Move added in v1.0.183

Move navigates focus using the given direction and returns selected element data.

func (*ControlInterface) PerformAction added in v1.0.183

func (a *ControlInterface) PerformAction(actionName Action, currentPlatformElementValue string) error

performAction performs the standard accessibility action without alert checking

func (ControlInterface) ResetToDefaultAccessibilitySettings added in v1.0.171

func (a ControlInterface) ResetToDefaultAccessibilitySettings() error

func (ControlInterface) SwitchToDevice

func (a ControlInterface) SwitchToDevice()

SwitchToDevice is the same as switching to the Device in AX inspector. After running this, notifications and events should be received.

func (ControlInterface) TurnOff

func (a ControlInterface) TurnOff()

TurnOff disable AX

func (ControlInterface) UpdateAccessibilitySetting added in v1.0.122

func (a ControlInterface) UpdateAccessibilitySetting(name string, val interface{})

type MoveDirection added in v1.0.183

type MoveDirection int32

Direction represents navigation direction values used by AX service

const (
	DirectionPrevious MoveDirection = 3
	DirectionNext     MoveDirection = 4
	DirectionFirst    MoveDirection = 5
	DirectionLast     MoveDirection = 6
)

Jump to

Keyboard shortcuts

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