#776: Project panel arrow-key navigation and accessible names
Problem: with the Project panel focused the arrow keys did nothing (After Effects selects the previous / next item, extends with Shift and opens / closes folders with Right / Left). The custom-drawn rows, sort headers, twirls, label swatches, proxy switches and footer buttons reached AccessKit with no name or role, the empty list area and each row's name cell were unnamed extra Tab stops, a Tab-focused row showed no focus ring, and the arrows then moved egui's spatial focus instead. Fix: Up / Down select the previous / next row (Shift extends from the anchor), Right opens and Left closes the selected folder or selects the parent; the moved-to row scrolls into view. A row with keyboard focus keeps the arrows, focus follows the selection and the panel takes focus. Rows are AccessKit tree items named "<name>, <type>" with selected, level and expanded state; headers and row / footer buttons are named buttons; one Tab stop per row and a focus ring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a7d3e7699
commit
132bd21078
@@ -127,16 +127,21 @@ fn footage_context_menu_interprets_the_footage() {
|
||||
}
|
||||
h.run_steps(2);
|
||||
};
|
||||
// The menu's Interpret Footage entry, not the panel's footer button of the same name.
|
||||
let menu_entry = |h: &Harness<'_, EffectcraftApp>| {
|
||||
let footer = center(h, "project.interpret");
|
||||
h.query_all_by_label_contains("Interpret Footage").find(|n| !n.rect().contains(footer)).map(|n| n.rect())
|
||||
};
|
||||
let at = center(&h, &format!("project.item.{}.name", solid.0));
|
||||
right_click(&mut h, at);
|
||||
assert_eq!(h.state().session.state.project_selection, vec![solid]);
|
||||
assert!(h.query_by_label_contains("Interpret Footage").is_none(), "a solid isn't footage");
|
||||
assert!(menu_entry(&h).is_none(), "a solid isn't footage");
|
||||
h.input_mut().events.push(Event::Key { key: egui::Key::Escape, physical_key: None, pressed: true, repeat: false, modifiers: Modifiers::NONE });
|
||||
h.run_steps(2);
|
||||
let at = center(&h, &format!("project.item.{}.name", clip.0));
|
||||
right_click(&mut h, at);
|
||||
assert_eq!(h.state().session.state.project_selection, vec![clip], "right-click selects the item");
|
||||
let sub = h.query_by_label_contains("Interpret Footage").expect("Interpret Footage in the menu").rect();
|
||||
let sub = menu_entry(&h).expect("Interpret Footage in the menu");
|
||||
h.input_mut().events.push(Event::PointerMoved(sub.center()));
|
||||
h.run_steps(3);
|
||||
let main = h.query_by_label_contains("Main...").expect("Interpret Footage ▸ Main...").rect();
|
||||
|
||||
Reference in New Issue
Block a user