plushie/prop/a11y
Accessibility properties for widgets.
Builder pattern: start with new() and pipe through role, label,
description, hidden, level, etc. Wire format is a flat dictionary
of string-keyed PropValues.
Types
pub type A11y {
A11y(props: dict.Dict(String, node.PropValue))
}
Constructors
-
A11y(props: dict.Dict(String, node.PropValue))
Popup type for has_popup attribute.
pub type HasPopup {
ListboxPopup
MenuPopup
DialogPopup
TreePopup
GridPopup
}
Constructors
-
ListboxPopup -
MenuPopup -
DialogPopup -
TreePopup -
GridPopup
Orientation type for accessible widgets.
pub type Orientation {
Horizontal
Vertical
}
Constructors
-
Horizontal -
Vertical
Roles recognized by the Rust renderer’s parse_role function. WAI-ARIA roles NOT supported by the renderer (no iced accessible::Role mapping): application, article, banner, complementary, content_info, definition, directory, feed, figure, form, grid, grid_cell, list_box, log, main, marquee, math, menu_item_checkbox, menu_item_radio, note, option, presentation, radio_group, row_group, row_header, search_box, spin_button, term, timer, tree_grid.
pub type Role {
Alert
AlertDialog
Button
Canvas
CheckBox
ColumnHeader
ComboBox
Dialog
Document
Group
Heading
Image
Label
Link
List
ListItem
Menu
MenuBar
MenuItem
Meter
MultilineTextInput
Navigation
ProgressIndicator
RadioButton
Region
Row
Cell
ScrollBar
ScrollView
Search
Separator
Slider
StaticText
Status
Switch
Tab
TabList
TabPanel
Table
TextInput
Toolbar
Tooltip
Tree
TreeItem
Window
}
Constructors
-
Alert -
AlertDialog -
Button -
Canvas -
CheckBox -
ColumnHeader -
ComboBox -
Dialog -
Document -
Group -
Heading -
Image -
Label -
Link -
List -
ListItem -
Menu -
MenuBar -
MenuItem -
Meter -
MultilineTextInput -
Navigation -
ProgressIndicator -
RadioButton -
Region -
Row -
Cell -
ScrollBar -
ScrollView -
Search -
Separator -
Slider -
StaticText -
Status -
Switch -
Tab -
TabList -
TabPanel -
Table -
TextInput -
Toolbar -
Tooltip -
Tree -
TreeItem -
Window
Values
pub fn described_by(a: A11y, id: String) -> A11y
Set the ID of the widget that describes this one. Resolved during tree normalization (scoped ID lookup).
pub fn error_message(a: A11y, id: String) -> A11y
Set the ID of the widget showing the error message for this one. Resolved during tree normalization (scoped ID lookup).
pub fn hidden(a: A11y, b: Bool) -> A11y
Set whether the element is hidden from assistive technology.
pub fn labelled_by(a: A11y, id: String) -> A11y
Set the ID of the widget that labels this one. Resolved during tree normalization (scoped ID lookup).
pub fn orientation(a: A11y, o: Orientation) -> A11y
Set the orientation of the widget.
pub fn position_in_set(a: A11y, n: Int) -> A11y
Set 1-based position within a set (lists, radio groups, tabs).
pub fn role_to_string(r: Role) -> String
Convert a Role to its wire-format string representation.
pub fn set(a: A11y, key: String, val: node.PropValue) -> A11y
Set an arbitrary accessibility property.
pub fn to_prop_value(a: A11y) -> node.PropValue
Encode an A11y to its wire-format PropValue.