Update accesskit and accesskit_winit requirements (#18285)

# Objective

- Fixes #18225

## Solution

-  Updated `accesskit` version requirement from 0.17 to 0.18
-  Updated `accesskit_winit` version requirement from 0.23 to 0.25

## Testing

- Ran CI checks locally.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Martín Maita 2025-03-25 05:04:28 +01:00 committed by François Mockers
parent 0702f3652d
commit c16a884ccb
6 changed files with 10 additions and 7 deletions

View File

@ -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]

View File

@ -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 }

View File

@ -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]

View File

@ -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]

View File

@ -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,

View File

@ -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,