You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AccessKit relations set from draw closures can name nodes absent from the tree (adapter unwrap panic) #387
From #381's work: AccessKit's platform adapters unwrap every node a relation names, so a relation pointing at a node that isn't in that frame's tree (a closed region, an unbuilt lazy panel) panics inside the adapter. That's a library-caused crash in native builds with accessibility on (#279's no-panics rule).
#381 adds NodeHandle::controls(Id) safely: relations are collected during the walk and announced after the pass, only when both ends are in the tree.
Two relations on main use the unsafe shape:
src/draw.rs:~2314label_for: push_labelled_by(label) written through accesskit_node_builder(control, ..) from a draw closure. If the control isn't built that frame, this names a missing node.
src/vlist.rs:~603set_active_descendant(row): the row is drawn in the same closure, so it's probably safe, but it should go through the same mechanism.
Fix: route every relation (labelled_by, described_by, controls, active_descendant, member_of, …) through #381's collected-after-the-pass path, and add a test per relation with a missing target.
Activity