#[non_exhaustive]pub struct DomElement {
pub ref_id: String,
pub tag: String,
pub role: Option<String>,
pub name: Option<String>,
pub text: Option<String>,
pub value: Option<String>,
pub enabled: bool,
pub visible: bool,
pub focusable: bool,
pub bounds: Option<ElementBounds>,
pub children: Vec<Self>,
pub attributes: BTreeMap<String, String>,
}Expand description
A single element in the accessible DOM tree with semantic metadata and ref handle.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ref_id: StringUnique ref handle for this element (e.g. “e3”), used to target interactions.
tag: StringHTML tag name (e.g. “div”, “button”).
role: Option<String>ARIA role if present (e.g. “button”, “navigation”).
name: Option<String>Accessible name derived from aria-label, text content, or other heuristics.
text: Option<String>Visible text content of the element.
value: Option<String>Form input value, if applicable.
enabled: boolWhether the element is interactive (not disabled).
visible: boolWhether the element is visible in the viewport.
focusable: boolWhether the element can receive keyboard focus.
bounds: Option<ElementBounds>Pixel-level bounding rectangle, if available.
children: Vec<Self>Nested child elements forming the accessible subtree.
attributes: BTreeMap<String, String>Raw HTML attributes on the element.
Trait Implementations§
Source§impl Clone for DomElement
impl Clone for DomElement
Source§impl Debug for DomElement
impl Debug for DomElement
Source§impl<'de> Deserialize<'de> for DomElement
impl<'de> Deserialize<'de> for DomElement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DomElement
impl PartialEq for DomElement
Source§impl Serialize for DomElement
impl Serialize for DomElement
impl StructuralPartialEq for DomElement
Auto Trait Implementations§
impl Freeze for DomElement
impl RefUnwindSafe for DomElement
impl Send for DomElement
impl Sync for DomElement
impl Unpin for DomElement
impl UnsafeUnpin for DomElement
impl UnwindSafe for DomElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more