diff --git a/examples/cosmic/Cargo.toml b/examples/cosmic/Cargo.toml index a01f81b..4a704a1 100644 --- a/examples/cosmic/Cargo.toml +++ b/examples/cosmic/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] apply = "0.3.0" fraction = "0.14.0" -libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "dbus-config", ] } +libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "dbus-config", "a11y" ] } once_cell = "1.18" slotmap = "1.0.6" env_logger = "0.10" diff --git a/iced b/iced index 68b3e49..484ac7b 160000 --- a/iced +++ b/iced @@ -1 +1 @@ -Subproject commit 68b3e4966c0c0d66f138b8eabc37a2c117f95b6f +Subproject commit 484ac7be751d4cc6d87ef384562f0c137d86dfbb diff --git a/src/widget/button/widget.rs b/src/widget/button/widget.rs index f82a6ee..81a9fdb 100644 --- a/src/widget/button/widget.rs +++ b/src/widget/button/widget.rs @@ -47,7 +47,7 @@ where { id: Id, #[cfg(feature = "a11y")] - name: Option>, + name: Option>, #[cfg(feature = "a11y")] description: Option>, #[cfg(feature = "a11y")] @@ -187,7 +187,7 @@ where #[cfg(feature = "a11y")] /// Sets the name of the [`Button`]. - pub fn name(mut self, name: impl Into>) -> Self { + pub fn name(mut self, name: impl Into>) -> Self { self.name = Some(name.into()); self } @@ -203,7 +203,7 @@ where #[cfg(feature = "a11y")] /// Sets the description of the [`Button`]. - pub fn description(mut self, description: impl Into>) -> Self { + pub fn description(mut self, description: impl Into>) -> Self { self.description = Some(iced_accessibility::Description::Text(description.into())); self } @@ -653,7 +653,7 @@ pub fn update<'a, Message: Clone>( #[cfg(feature = "a11y")] Event::A11y(event_id, iced_accessibility::accesskit::ActionRequest { action, .. }) => { let state = state(); - if let Some(Some(on_press)) = (id == event_id + if let Some(Some(on_press)) = (event_id == event_id && matches!(action, iced_accessibility::accesskit::Action::Default)) .then(|| on_press.clone()) {