servoshell: Enable accesskit integration. (#37519)

These changes ensure that our browser shell can integrate with
screenreaders. We do not provide any accessibility information about
webview content yet, which requires further API design work in both
Servo, accesskit, and egui.

Testing: No a11y-specific testing at this point; just verifying that
existing tests continue to pass.
Fixes: part of #4344

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-06-24 23:52:49 -04:00 committed by GitHub
parent d114feb0fa
commit ef5784da0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 743 additions and 56 deletions

View file

@ -11,7 +11,7 @@
/// - servoshell<winit@NewEvents(WaitCancelled)=off
/// - servoshell<winit@RedrawEventsCleared=off
/// - servoshell<winit@RedrawRequested=off
/// - servoshell<winit@UserEvent(WakerEvent)=off
/// - servoshell<winit@UserEvent(Waker)=off
/// - servoshell<winit@WindowEvent(AxisMotion)=off
/// - servoshell<winit@WindowEvent(CursorMoved)=off
macro_rules! trace_winit_event {
@ -31,7 +31,7 @@ pub(crate) trait LogTarget {
mod from_winit {
use super::LogTarget;
use crate::desktop::events_loop::WakerEvent;
use crate::desktop::events_loop::AppEvent;
macro_rules! target {
($($name:literal)+) => {
@ -39,7 +39,7 @@ mod from_winit {
};
}
impl LogTarget for winit::event::Event<WakerEvent> {
impl LogTarget for winit::event::Event<AppEvent> {
fn log_target(&self) -> &'static str {
use winit::event::StartCause;
match self {
@ -51,7 +51,8 @@ mod from_winit {
},
Self::WindowEvent { event, .. } => event.log_target(),
Self::DeviceEvent { .. } => target!("DeviceEvent"),
Self::UserEvent(WakerEvent) => target!("UserEvent(WakerEvent)"),
Self::UserEvent(AppEvent::Waker) => target!("UserEvent(Waker)"),
Self::UserEvent(AppEvent::Accessibility(..)) => target!("UserEvent(Accessibility)"),
Self::Suspended => target!("Suspended"),
Self::Resumed => target!("Resumed"),
Self::AboutToWait => target!("AboutToWait"),