pub trait Widget {
// Required method
fn render(&mut self, ui: &mut dyn UiCtx);
// Provided methods
fn a11y_role(&self) -> A11yRole { ... }
fn a11y_label(&self) -> Option<String> { ... }
fn a11y_description(&self) -> Option<String> { ... }
}Expand description
A UI widget that can render itself into a UiCtx.
Required Methods§
Provided Methods§
Sourcefn a11y_role(&self) -> A11yRole
fn a11y_role(&self) -> A11yRole
Return the accessibility role for this widget.
Adapters call this to populate the a11y tree without requiring a full
oxiui-accessibility dependency in core. The default returns
A11yRole::Unknown.
Sourcefn a11y_label(&self) -> Option<String>
fn a11y_label(&self) -> Option<String>
Return a human-readable accessibility label for this widget.
Used as the accessible name. Returns None by default (no label).
Sourcefn a11y_description(&self) -> Option<String>
fn a11y_description(&self) -> Option<String>
Return an accessibility description (longer hint text) for this widget.
Returns None by default.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".