Expand description
Roles: the runtime Role enum, one zero-sized marker type per role, and the sealed
capability traits that say what each role can do.
Code written by people names a role through its marker type, such as Button or
CheckBox, so a method gated on a capability only compiles for roles that have it.
Trees, YAML, selector strings and the wire carry the runtime Role instead.
Everything here comes from one table, so the enum, the marker types, the capability impls and the names cannot drift apart.
Structs§
- Alert
- The role type for
Role::Alert, selector namealert. - Alert
Dialog - The role type for
Role::AlertDialog, selector namealertdialog. - AnyRole
- The role of a node found by text, test id or a run-time selector.
- Button
- The role type for
Role::Button, selector namebutton. - Canvas
- The role type for
Role::Canvas, selector namecanvas. - Capabilities
- The run-time mirror of the capability traits, for the recorder, the remote client and audits.
- Cell
- The role type for
Role::Cell, selector namecell. - Check
Box - The role type for
Role::CheckBox, selector namecheckbox. - Column
Header - The role type for
Role::ColumnHeader, selector namecolumnheader. - Combo
Box - The role type for
Role::ComboBox, selector namecombobox. - Dialog
- The role type for
Role::Dialog, selector namedialog. - Document
- The role type for
Role::Document, selector namedocument. - Generic
- The role type for
Role::Generic, selector namegeneric. - Grid
- The role type for
Role::Grid, selector namegrid. - Group
- The role type for
Role::Group, selector namegroup. - Heading
- The role type for
Role::Heading, selector nameheading. - Image
- The role type for
Role::Image, selector nameimg. - Link
- The role type for
Role::Link, selector namelink. - List
- The role type for
Role::List, selector namelist. - ListBox
- The role type for
Role::ListBox, selector namelistbox. - List
Item - The role type for
Role::ListItem, selector namelistitem. - List
Option - The role type for
Role::ListOption, selector nameoption. - Menu
- The role type for
Role::Menu, selector namemenu. - MenuBar
- The role type for
Role::MenuBar, selector namemenubar. - Menu
Item - The role type for
Role::MenuItem, selector namemenuitem. - Menu
Item Check Box - The role type for
Role::MenuItemCheckBox, selector namemenuitemcheckbox. - Menu
Item Radio - The role type for
Role::MenuItemRadio, selector namemenuitemradio. - Navigation
- The role type for
Role::Navigation, selector namenavigation. - Paragraph
- The role type for
Role::Paragraph, selector nameparagraph. - Parse
Role Error - A string that names no role.
- Password
Input - The role type for
Role::PasswordInput, selector namepassword. - Progress
Indicator - The role type for
Role::ProgressIndicator, selector nameprogressbar. - Radio
Button - The role type for
Role::RadioButton, selector nameradio. - Radio
Group - The role type for
Role::RadioGroup, selector nameradiogroup. - Region
- The role type for
Role::Region, selector nameregion. - Role
Mismatch - A role type was asked for a
Roleit does not stand for. - Row
- The role type for
Role::Row, selector namerow. - RowHeader
- The role type for
Role::RowHeader, selector namerowheader. - Scrim
- The role type for
Role::Scrim, selector namescrim. - Scroll
View - The role type for
Role::ScrollView, selector namescrollview. - Search
Box - The role type for
Role::SearchBox, selector namesearchbox. - Separator
- The role type for
Role::Separator, selector nameseparator-static. - Slider
- The role type for
Role::Slider, selector nameslider. - Spin
Button - The role type for
Role::SpinButton, selector namespinbutton. - Splitter
- The role type for
Role::Splitter, selector nameseparator. - Status
- The role type for
Role::Status, selector namestatus. - Switch
- The role type for
Role::Switch, selector nameswitch. - Tab
- The role type for
Role::Tab, selector nametab. - TabList
- The role type for
Role::TabList, selector nametablist. - TabPanel
- The role type for
Role::TabPanel, selector nametabpanel. - Table
- The role type for
Role::Table, selector nametable. - Text
- The role type for
Role::Text, selector nametext. - TextBox
- The role type for
Role::TextBox, selector nametextbox. - Toggle
Button - The role type for
Role::ToggleButton, selector nametogglebutton. - Toolbar
- The role type for
Role::Toolbar, selector nametoolbar. - Tooltip
- The role type for
Role::Tooltip, selector nametooltip. - Tree
- The role type for
Role::Tree, selector nametree. - Tree
Item - The role type for
Role::TreeItem, selector nametreeitem. - Unknown
- The role type for
Role::Unknown, selector nameunknown. - Window
- The role type for
Role::Window, selector namewindow.
Enums§
- Role
- The runtime role of a node, carried by trees, YAML, selector strings and the wire.
Traits§
- Checkable
- Roles that have a checked state:
check,uncheck,set_checked,to_be_checked. - Editable
- Roles whose text can be typed into:
fill,clear,press_sequentially,to_be_editable. - Expandable
- Roles that open and close:
expand,collapse,to_be_expanded. - HasValue
- Roles that have a value to read:
to_have_value. - Leveled
- Roles with a nesting level:
to_have_level. - Pressable
- Toggle buttons, which report whether they are pressed:
to_be_pressed. - Range
Value - Roles with a numeric value in a range:
set_value. - Role
Kind - The one marker trait every role type and
AnyRoleimplement. Sealed. - Role
Type - Implemented by concrete roles only, never by
AnyRole. Sealed throughRoleKind. - Selectable
- Roles that own a set of options to pick from:
select_option. - Selectable
Item - Items inside a list, tree, table or tab list that can be selected:
select,to_be_selected. - Untyped
- Implemented by
AnyRoleonly. Gates narrowing an untyped handle to a role.