diff --git a/Cargo.toml b/Cargo.toml index 2fb33ed4a3..0cccfe212c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -561,7 +561,7 @@ hyper = { version = "1", features = ["server", "http1"] } http-body-util = "0.1" anyhow = "1" macro_rules_attribute = "0.2" -accesskit = "0.17" +accesskit = "0.18" nonmax = "0.5" [target.'cfg(not(target_family = "wasm"))'.dev-dependencies] diff --git a/crates/bevy_a11y/Cargo.toml b/crates/bevy_a11y/Cargo.toml index ad301b4184..0d593c4ced 100644 --- a/crates/bevy_a11y/Cargo.toml +++ b/crates/bevy_a11y/Cargo.toml @@ -46,7 +46,7 @@ bevy_ecs = { path = "../bevy_ecs", version = "0.16.0-rc.1", default-features = f bevy_reflect = { path = "../bevy_reflect", version = "0.16.0-rc.1", default-features = false, optional = true } # other -accesskit = { version = "0.17", default-features = false } +accesskit = { version = "0.18", default-features = false } serde = { version = "1", default-features = false, features = [ "alloc", ], optional = true } diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index c33ddd77df..c958124a29 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -40,7 +40,7 @@ thiserror = { version = "2", default-features = false } derive_more = { version = "1", default-features = false, features = ["from"] } nonmax = "0.5" smallvec = "1.11" -accesskit = "0.17" +accesskit = "0.18" tracing = { version = "0.1", default-features = false, features = ["std"] } [features] diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index aa249fb2da..a8a7f36e8a 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -51,7 +51,7 @@ bevy_image = { path = "../bevy_image", version = "0.16.0-rc.1", optional = true # other # feature rwh_06 refers to window_raw_handle@v0.6 winit = { version = "0.30", default-features = false, features = ["rwh_06"] } -accesskit_winit = { version = "0.23", default-features = false, features = [ +accesskit_winit = { version = "0.25", default-features = false, features = [ "rwh_06", ] } approx = { version = "0.5", default-features = false } @@ -60,7 +60,7 @@ raw-window-handle = "0.6" serde = { version = "1.0", features = ["derive"], optional = true } bytemuck = { version = "1.5", optional = true } wgpu-types = { version = "24", optional = true } -accesskit = "0.17" +accesskit = "0.18" tracing = { version = "0.1", default-features = false, features = ["std"] } [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/crates/bevy_winit/src/accessibility.rs b/crates/bevy_winit/src/accessibility.rs index c2545d249a..575971ae18 100644 --- a/crates/bevy_winit/src/accessibility.rs +++ b/crates/bevy_winit/src/accessibility.rs @@ -3,6 +3,7 @@ use alloc::{collections::VecDeque, sync::Arc}; use bevy_input_focus::InputFocus; use std::sync::Mutex; +use winit::event_loop::ActiveEventLoop; use accesskit::{ ActionHandler, ActionRequest, ActivationHandler, DeactivationHandler, Node, NodeId, Role, Tree, @@ -66,8 +67,7 @@ impl AccessKitState { fn build_initial_tree(&mut self) -> TreeUpdate { let root = self.build_root(); let accesskit_window_id = NodeId(self.entity.to_bits()); - let mut tree = Tree::new(accesskit_window_id); - tree.app_name = Some(self.name.clone()); + let tree = Tree::new(accesskit_window_id); self.requested.set(true); TreeUpdate { @@ -116,6 +116,7 @@ impl DeactivationHandler for WinitDeactivationHandler { /// Prepares accessibility for a winit window. pub(crate) fn prepare_accessibility_for_window( + event_loop: &ActiveEventLoop, winit_window: &winit::window::Window, entity: Entity, name: String, @@ -131,6 +132,7 @@ pub(crate) fn prepare_accessibility_for_window( let deactivation_handler = WinitDeactivationHandler; let adapter = Adapter::with_direct_handlers( + event_loop, winit_window, activation_handler, action_handler, diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index cd281103e4..dfb68fbcce 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -278,6 +278,7 @@ impl WinitWindows { let winit_window = event_loop.create_window(winit_window_attributes).unwrap(); let name = window.title.clone(); prepare_accessibility_for_window( + event_loop, &winit_window, entity, name,