Skip to content

#776: Project panel arrow-key navigation and accessible names - #780

Merged
h-a-n-a-s-h-i merged 2 commits into
storytold:mainfrom
vangel76:gap-project-panel-a11y
Oct 12, 2026
Merged

h-a-n-a-s-h-i merged 2 commits into
storytold:mainfrom
vangel76:gap-project-panel-a11y

Conversation

@vangel76

Copy link
Copy Markdown
Contributor

Fixes #776.

Part of ranked gap #25 "Accessibility" (ui-parity.md; AccessKit is enabled, tests read focus labels, but no keyboard-navigation audit, screen-reader pass or contrast check). This PR takes the keyboard-reachability and accessible-names slice for one major panel, the Project panel (docs/gaps.md).

Problem

  • With the Project panel focused, the arrow keys did nothing. In After Effects, Up / Down Arrow select the previous / next item, Shift+Up / Down extend the selection, and Right / Left Arrow open / close the selected folder.
  • The panel's custom-drawn rows, sort headers, folder twirls, label swatches, proxy switches, comment cells and footer buttons reached AccessKit with no name or role, so a screen reader had nothing useful to announce. The empty list area and each row's name cell were extra, unnamed Tab stops.
  • A row focused with Tab showed no focus ring, and the arrow keys then moved egui's spatial focus instead of the selection.

Fix (crates/ui-egui/src/panels/project.rs only)

  • Arrow keys: Up / Down select the previous / next visible row. With nothing selected, Down selects the first row and Up the last. Shift extends the selection from the anchor that a click or plain arrow set. Right opens the selected folder. Left closes it, or on an item inside a folder selects the folder. The moved-to row scrolls into view; the scroll is computed with max/min rather than clamp, so a panel shorter than one row can't panic. The keys apply only while the panel has focus and no dialog, menu or inline rename is open. A row that has keyboard focus keeps the arrows: egui's spatial move is cancelled, focus follows the selection, and the panel takes focus.
  • Screen readers: each row is an AccessKit TreeItem named "<name>, <type>", with selected state, level and (for folders) expanded state. Sort headers are buttons named "Sort by Name, ascending". The twirl ("Open folder X"), proxy, label-swatch and footer buttons are named, and so are the bit-depth button and the comment cell.
  • Tab order and focus ring: there is one Tab stop per row; the empty area, the name cell, the header filler and the comment cell no longer take focus. A focused row draws a focus ring in the accent colour.
  • No new dependencies, no project or schema changes, no catalog rows. New names go through tr/tr_args and fall back to English.

Tests

  • New crates/ui-egui/tests/ui_project_keyboard.rs (5 tests): moving and extending the selection, opening and closing folders and jumping to the parent, arrows ignored while another panel has focus, AccessKit names / roles / selected / expanded / level, and a row focused through AccessKit (as Tab or a screen reader does) keeping the arrows with focus following the selection. Four of the five fail without the change.
  • ui_project_rows.rs::footage_context_menu_interprets_the_footage now picks the context menu's "Interpret Footage" entry instead of the footer button of the same name, which is now named for screen readers.

Gates

  • cargo fmt --check: ok
  • cargo clippy -j 4 -p effectcraft-ui-egui --all-targets -- -D warnings: ok
  • cargo test -j 4 -p effectcraft-ui-egui --no-fail-fast: all test targets pass. ui_gpu passes its 2 tests and then segfaults at process exit, as it also does on main on this machine.
  • cargo xtask layers: ok
  • The full cargo xtask ci was not run locally because the machine is shared. ui-egui is L5, so no wasm check of L0–L4 crates was needed.

What remains

  • The same keyboard and screen-reader pass for the other panels: Timeline, Effect Controls, Effects & Presets, Render Queue and others.
  • With a row focused, app shortcuts such as Delete still don't run, because they wait while any egui widget has focus (menus.rs).
  • A WCAG contrast check of the built-in themes (left until UI: Add appearance styles aligned with PhotoCraft #400 settles).

🤖 Generated with Claude Code

vangel76 and others added 2 commits October 11, 2026 12:53
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>
…on a row

A mouse click gives a Project row no keyboard focus, and the arrow keys
only move keyboard focus when a row already had it, so Delete /
Backspace, Cmd+D and Enter keep working for mouse users, also after an
arrow key moved the selection. Pin that down with a headless test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@echelon

echelon commented Oct 12, 2026

Copy link
Copy Markdown
Member

Merged. Thank you for the contribution, @vangel76!

If you haven't already, come join us on Discord: https://discord.gg/artcraft. It's the best place to discuss what you're working on next and to coordinate with other contributors.

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

Successfully merging this pull request may close these issues.

Project panel: arrow-key navigation and accessible names (keyboard / screen reader)

3 participants