1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00

Accessibility inspector plugin (#7368)

Adds an accessibility inspector plugin that shows the current AccessKit
tree:


https://github.com/user-attachments/assets/78f4f221-1bd2-4ce4-adf5-fc3b00f5c16c

Macos has a built in accessibility inspector, but it doesn't seem to
work with AccessKit / eframe so this provides some insight into the
accesskit state.

This also showed a couple issues that are easy to fix:
- [ ] Links show up as `Label` instead of links
- [ ] Not all supported actions are advertised (e.g. scrolling)
- [ ] The resize handles in windows shouldn't be focusable
- [ ] Checkbox has no value
- [ ] Menus should have the button as parent widget (not 100% sure on
this one)


Currently the plugin lives in the demo app, but I think it should be
moved somewhere else. Maybe egui_extras?

This could also be relevant for #4650
This commit is contained in:
Lucas Meurer
2025-10-07 14:39:49 +02:00
committed by GitHub
parent d83f4500a3
commit 7fc80d8623
7 changed files with 285 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ default = ["glow", "persistence"]
# image_viewer adds about 0.9 MB of WASM
web_app = ["http", "persistence"]
accessibility_inspector = ["dep:accesskit", "dep:accesskit_consumer", "eframe/accesskit"]
http = ["ehttp", "image/jpeg", "poll-promise", "egui_extras/image"]
image_viewer = ["image/jpeg", "egui_extras/all_loaders", "rfd"]
persistence = [
@@ -64,7 +65,8 @@ log.workspace = true
profiling.workspace = true
# Optional dependencies:
accesskit = { workspace = true, optional = true }
accesskit_consumer = { workspace = true, optional = true }
bytemuck = { workspace = true, optional = true }
puffin = { workspace = true, optional = true }
puffin_http = { workspace = true, optional = true }