Enum Action
#[repr(u8)]pub enum Action {
Show 15 variants
Press = 0,
Focus = 1,
SetValue = 2,
Toggle = 3,
Expand = 4,
Collapse = 5,
Select = 6,
ShowMenu = 7,
ScrollIntoView = 8,
Scroll = 9,
Increment = 10,
Decrement = 11,
Blur = 12,
SetTextSelection = 13,
TypeText = 14,
}Expand description
A normalized enum of interactions that can be performed on accessibility elements.
Variants§
Press = 0
Click / tap / invoke
Focus = 1
Set keyboard focus
SetValue = 2
Set text content or numeric value.
Accepts ActionData::Value(String) for text or
ActionData::NumericValue(f64) for numeric values.
Platform note: On Linux AT-SPI, the Value interface only supports
numeric values (f64). Setting text requires the Text interface.
Toggle = 3
Toggle a checkbox or switch
Expand = 4
Expand a collapsible element
Collapse = 5
Collapse an expanded element
Select = 6
Select an item in a list or table
ShowMenu = 7
Show context menu or dropdown
ScrollIntoView = 8
Scroll element into visible area.
Platform note: No-op on macOS (no direct AX equivalent).
Scroll = 9
Scroll by a given amount and direction.
Accepts ActionData::ScrollAmount { direction, amount }.
Amount is in logical scroll units (≈ one mouse wheel notch).
Platform mapping:
- macOS:
CGEventCreateScrollWheelEventwith pixel delta (1 unit ≈ 10px) - Windows:
IUIAutomationScrollPattern.Scroll()withSmallIncrementrepeated - Linux: AT-SPI
Component.ScrollTowith edge alignment
Increment = 10
Increment a slider or spinner
Decrement = 11
Decrement a slider or spinner
Blur = 12
Remove keyboard focus from element
SetTextSelection = 13
Select a text range within an editable element.
Accepts ActionData::TextSelection { start, end }.
TypeText = 14
Insert text at the current cursor position via the accessibility API.
Uses platform text-editing interfaces (AXSelectedText on macOS, EditableText.InsertText on Linux, ValuePattern on Windows) — never synthetic keyboard events.
Accepts ActionData::Value(String).