diff --git a/src/components/avatar.rs b/src/components/avatar.rs index 998b74a3..52d949c8 100644 --- a/src/components/avatar.rs +++ b/src/components/avatar.rs @@ -29,6 +29,8 @@ mod imp { fn class_init(klass: &mut Self::Class) { AvatarImage::static_type(); Self::bind_template(klass); + + klass.set_accessible_role(gtk::AccessibleRole::Img); } fn instance_init(obj: &InitializingObject) { @@ -84,8 +86,14 @@ mod imp { } impl WidgetImpl for Avatar {} - impl BinImpl for Avatar {} + + impl AccessibleImpl for Avatar { + fn first_accessible_child(&self) -> Option { + // Hide the children in the a11y tree. + None + } + } } glib::wrapper! {