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

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 busy(a: A11y, b: Bool) -> A11y

Set loading/processing state.

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 description(a: A11y, s: String) -> A11y

Set the accessible description.

pub fn disabled(a: A11y, b: Bool) -> A11y

Override disabled state for assistive technology.

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 expanded(a: A11y, b: Bool) -> A11y

Set expanded/collapsed state for disclosure widgets.

pub fn has_popup(a: A11y, p: HasPopup) -> A11y

Set the popup type for this widget.

pub fn hidden(a: A11y, b: Bool) -> A11y

Set whether the element is hidden from assistive technology.

pub fn invalid(a: A11y, b: Bool) -> A11y

Set form validation failure state.

pub fn label(a: A11y, s: String) -> A11y

Set the accessible label.

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 level(a: A11y, n: Int) -> A11y

Set the heading level (1-6).

pub fn live(a: A11y, s: String) -> A11y

Set the live region politeness.

pub fn mnemonic(a: A11y, s: String) -> A11y

Set an Alt+letter keyboard shortcut (single character).

pub fn modal(a: A11y, b: Bool) -> A11y

Set whether a dialog is modal.

pub fn new() -> A11y

Create an empty accessibility property set.

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 read_only(a: A11y, b: Bool) -> A11y

Set read-only state (can be read but not edited).

pub fn required(a: A11y, b: Bool) -> A11y

Mark a form field as required.

pub fn role(a: A11y, r: Role) -> A11y

Set the ARIA role.

pub fn role_to_string(r: Role) -> String

Convert a Role to its wire-format string representation.

pub fn selected(a: A11y, b: Bool) -> A11y

Set selected state for custom selectable widgets.

pub fn set(a: A11y, key: String, val: node.PropValue) -> A11y

Set an arbitrary accessibility property.

pub fn size_of_set(a: A11y, n: Int) -> A11y

Set the total number of items in the set.

pub fn to_prop_value(a: A11y) -> node.PropValue

Encode an A11y to its wire-format PropValue.

pub fn toggled(a: A11y, b: Bool) -> A11y

Set toggled/checked state for custom toggle widgets.

pub fn value(a: A11y, s: String) -> A11y

Set the current value as a string (for custom value-displaying widgets).

Search Document