enum
Role
pub enum Role {
Document,
Main,
Navigation,
Banner,
ContentInfo,
Complementary,
Region,
Article,
Form,
Search,
Group,
Heading,
Paragraph,
BlockQuote,
Note,
StaticText,
Button,
Link,
TextBox,
SearchBox,
CheckBox,
Radio,
RadioGroup,
Switch,
Slider,
SpinButton,
ComboBox,
ListBox,
Option,
Image,
List,
ListItem,
Separator,
Figure,
GraphicsSymbol,
Dialog,
AlertDialog,
Alert,
Status,
Log,
Timer,
ProgressBar,
Meter,
Tab,
TabList,
TabPanel,
Menu,
MenuBar,
MenuItem,
Toolbar,
Tooltip,
Table,
Row,
Cell,
ColumnHeader,
RowHeader,
Grid,
GridCell,
Tree,
TreeItem,
}What an element is to assistive technology: its ARIA role ([Role::aria] names it).
Variants
Methods
parse
pub fn parse(s: &str) -> Option<Role>The role whose ARIA name is s ("button" → [Role::Button]), if it's one Weft knows.
name_from_content
pub fn name_from_content(&self) -> boolRoles whose accessible name comes from their text content.
is_leaf
pub fn is_leaf(&self) -> boolRoles whose subtree is summarised by the node itself (children are not exposed separately).