Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report egui::Window contents as children to accesskit #5240

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

Wcubed
Copy link
Contributor

@Wcubed Wcubed commented Oct 9, 2024

Previously, all widgets would be listed in accesskit as children of the toplevel window.
With this change, they will be reported as child of the egui::Window they are in, Which should increase parseability of the ui for screenreaders and integration tests.

Added an accesskit test to check that it is indeed working.

Copy link

github-actions bot commented Oct 9, 2024

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

@lucasmerlin
Copy link
Collaborator

lucasmerlin commented Oct 9, 2024

Awesome!
I also stumbled upon this in my work on #5166, I think it'd actually make sense if all children of a ui are automatically added as a child of that ui in accesskit? So e.g. if you create a ui.group() with a button, that button should be child of the group?

Also, once #5166 is done we should be able to simplify the accesskit tests using kittest

@Wcubed
Copy link
Contributor Author

Wcubed commented Oct 11, 2024

That was indeed my idea as well 😄.

@emilk emilk added accessibility More accessible to e.g. the visually impaired egui_kittest labels Oct 29, 2024
@emilk emilk merged commit 4622fff into emilk:master Oct 29, 2024
22 of 25 checks passed
@Wcubed Wcubed deleted the accesskit_window_parent branch October 29, 2024 08:55
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
Previously, all widgets would be listed in accesskit as children of the
toplevel window.
With this change, they will be reported as child of the `egui::Window`
they are in, Which should increase parseability of the ui for
screenreaders and integration tests.

Added an accesskit test to check that it is indeed working.

Co-authored-by: Wybe Westra <w.westra@kwantcontrols.nl>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants