fix(iced): a11y tree focus
This commit is contained in:
parent
9a8a56952d
commit
a9c7c3cdbf
2 changed files with 9 additions and 2 deletions
2
iced
2
iced
|
|
@ -1 +1 @@
|
||||||
Subproject commit 501d7aaebe113a785f53e3f139e48be8a6dd4d1a
|
Subproject commit 630612a7b1cb4fb236edabb2dee88b1754976549
|
||||||
|
|
@ -116,7 +116,7 @@ impl<'a, Message: Clone + 'static> From<Button<'a, Message>> for Element<'a, Mes
|
||||||
.into()
|
.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.
|
// Optional icon to place before label.
|
||||||
.push_maybe(leading_icon)
|
.push_maybe(leading_icon)
|
||||||
// Optional label between icons.
|
// Optional label between icons.
|
||||||
|
|
@ -134,6 +134,13 @@ impl<'a, Message: Clone + 'static> From<Button<'a, Message>> for Element<'a, Mes
|
||||||
.on_press_maybe(builder.on_press.take())
|
.on_press_maybe(builder.on_press.take())
|
||||||
.class(builder.class);
|
.class(builder.class);
|
||||||
|
|
||||||
|
#[cfg(feature = "a11y")]
|
||||||
|
{
|
||||||
|
if !builder.label.is_empty() {
|
||||||
|
button = button.name(builder.label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if builder.tooltip.is_empty() {
|
if builder.tooltip.is_empty() {
|
||||||
button.into()
|
button.into()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue