Skip to content

Add support for scrolling via accesskit / kittest - #7286

Merged
lucasmerlin merged 7 commits into
mainfrom
lucas/accesskit-kittest-scrolling
Jul 3, 2025
Merged

lucasmerlin merged 7 commits into
mainfrom
lucas/accesskit-kittest-scrolling

Conversation

@lucasmerlin

Copy link
Copy Markdown
Collaborator

I need to scroll in a snapshot test in my app, and kittest had no utilities for this. Event::MouseWheel is error prone. This adds support for some accesskit scroll actions, and uses this in kittest to add helpers to scroll to a node / scroll the scroll area surrounding a node.

The accesskit code says down/up/left/right Scrolls by approximately one screen in a specific direction.. Unfortunately it's difficult to get the size of a "screen" (I guess that would be the size of the containing scroll area)where I implemented the scrolling, so for now I've hardcoded it to 100px. I think scrolling a fixed amount is still better than not scrolling at all.

@lucasmerlin
lucasmerlin force-pushed the lucas/accesskit-kittest-scrolling branch from 9874291 to 8564b73 Compare July 1, 2025 17:36
@github-actions

github-actions Bot commented Jul 1, 2025

Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/7286-lucasaccesskit-kittest-scrolling
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@lucasmerlin lucasmerlin added accessibility More accessible to e.g. the visually impaired egui egui_kittest labels Jul 1, 2025
Comment thread crates/egui/src/context.rs
Comment thread crates/egui_kittest/src/lib.rs
lucasmerlin and others added 3 commits July 2, 2025 08:46
@lucasmerlin
lucasmerlin merged commit 6d312cc into main Jul 3, 2025
@lucasmerlin
lucasmerlin deleted the lucas/accesskit-kittest-scrolling branch July 3, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility More accessible to e.g. the visually impaired egui_kittest egui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants