Skip to content

Wrap accessibility tree in Window node by default #531

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

Open
PoignardAzur opened this issue Mar 21, 2025 · 3 comments
Open

Wrap accessibility tree in Window node by default #531

PoignardAzur opened this issue Mar 21, 2025 · 3 comments

Comments

@PoignardAzur
Copy link
Contributor

Right now AccessKit kind of forces you to create a wrapper node/widget around your tree with the specific purpose of having the Window role. It would be nice if AccessKit provided that role for you by default, asking you to create Window nodes only for multi-window setups or other special cases.

@DataTriny
Copy link
Member

I feel this would only make the API more confusing:

  • Should the root node be exposed to implementors?
  • Which ID should this node use? Should implementors be in charge of deciding or would we pick a value and ban users from using it for their own widgets?
  • If the root node is not exposed, any node without a parent becomes a child of the root window. This makes it confusing to still talk about a tree then.

I think what is actually confusing is for toolkit authors to be in charge of supplying this window node, where this should really be the responsibility of the windowing provider. Glazier was doing just that if I recall correctly.

@mwcampbell
Copy link
Contributor

The toolkit had to provide the window node when using glazier as well.

I think what should really happen is that accesskit_winit, or something like glazier, should automatically provide the window node. To make that work properly, I think we'll need to address the open design question of how to implement subtrees. A very early iteration of the AccessKit schema had subtrees, copied from Chromium, but we need to revisit that and figure out what will work best with our existing design. I think we're going to need subtrees anyway in order to properly make winit's client-side decorations on Wayland accessible.

@PoignardAzur
Copy link
Contributor Author

I'm actually starting to lean the other way, and thinking we might want Masonry to provide the root node.

I'm especially thinking of multi-window cases, where in some cases, the root is a window, and in other cases it's a context menu or a picker menu. You would want to specify those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants