pub enum Role {
Show 28 variants
Button,
Link,
TextField,
SecureTextField,
SearchField,
Switch,
Toggle,
CheckBox,
Radio,
Image,
StaticText,
Tab,
TabBar,
NavigationBar,
Cell,
Alert,
Dialog,
Slider,
ProgressBar,
Picker,
Menu,
MenuItem,
ScrollView,
SegmentedControl,
Table,
CollectionView,
WebView,
Keyboard,
}Expand description
Accessibility role enum (29 variants).
serde(rename_all = "camelCase") keeps the JSON wire identical to the
Swift-side /tree route output (“staticText” not “static_text”).
Variants§
Button
Tappable button (UIButton / SwiftUI Button).
Link
Hyperlink (anchor-like target).
TextField
Plain editable text input (UITextField / TextInput).
SecureTextField
Password / sensitive text input (input masked).
SearchField
Search-style text input (UISearchBar).
Switch
On/off toggle (UISwitch).
Toggle
Generic toggle button (two-state).
CheckBox
Multi-state checkbox.
Radio
Radio button (one-of-many select).
Image
Image element (UIImageView).
StaticText
Read-only display label (UILabel).
Tab
Tab element inside a tab bar.
TabBar
Tab bar container (UITabBar).
Top navigation bar (UINavigationBar).
Cell
List / collection cell (UITableViewCell / UICollectionViewCell).
Alert
System alert popup (UIAlertController .alert style).
Dialog
Modal dialog (UIAlertController .dialog / custom modal).
Slider
Continuous slider input (UISlider).
ProgressBar
Progress indicator (UIProgressView).
Picker
Date / wheel-style picker (UIPickerView).
Menu
Drop-down or action menu.
MenuItem
Single menu item inside a Menu.
ScrollView
Scrollable container (UIScrollView).
SegmentedControl
Segmented control (UISegmentedControl).
Table
Table view (UITableView).
CollectionView
Collection view (UICollectionView).
WebView
Embedded web view (WKWebView).
Keyboard
On-screen software keyboard.