Skip to content

Commit

Permalink
update iced
Browse files Browse the repository at this point in the history
fix for a11y tree focus
  • Loading branch information
wash2 committed Nov 22, 2024
1 parent 525a14c commit a860fae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iced
Submodule iced updated 1 files
+99 −93 winit/src/program.rs
9 changes: 8 additions & 1 deletion src/widget/button/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl<'a, Message: Clone + 'static> From<Button<'a, Message>> for Element<'a, Mes
.into()
});

let button: super::Button<'a, Message> = row::with_capacity(3)
let mut button: super::Button<'a, Message> = row::with_capacity(3)
// Optional icon to place before label.
.push_maybe(leading_icon)
// Optional label between icons.
Expand All @@ -134,6 +134,13 @@ impl<'a, Message: Clone + 'static> From<Button<'a, Message>> for Element<'a, Mes
.on_press_maybe(builder.on_press.take())
.class(builder.class);

#[cfg(feature = "a11y")]
{
if !builder.label.is_empty() {
button = button.name(builder.label);
}
}

if builder.tooltip.is_empty() {
button.into()
} else {
Expand Down

0 comments on commit a860fae

Please sign in to comment.