Problem #
The step controls added in #19 (8a07212) drop keyboard focus to <body> and all share the same accessible names. A keyboard or screen-reader user loses their place after every reorder or insert, and cannot tell which step a "Move step up" belongs to.
Evidence #
app/islands/AutomationForm.tsx:2813moveToreorders keyed cards. The hono/jsx reconciler moves the focused card's node (node_modules/hono/dist/jsx/dom/render.js:224-227,insertBefore/appendChild), which blurs the focused Move up/down button.AutomationForm.tsx:1593vs1605: the closed "Insert step here" is a<button key="insert-…">, and the open state is a different<div key="add-…">. Opening, collapsing or picking a tile (setPickerFor(null), line 1009) unmounts the focused control.AutomationForm.tsxaround 2884: "Outdent step" is not rendered oncecanOutdentis false. After outdenting to the top level, the focused button disappears.aria-label="Move step up","Move step down","Indent step"and"Outdent step"(2884-2919), and the "Insert step here" text, are the same on every step.- Raised in an earlier review on 2026-10-26 and not fixed on main.
Expected #
After any of these controls acts, focus lands on a sensible control:
- the same button on the moved card, or the other direction's button when the first one has become disabled;
- the open picker's first tile, or its toggle;
- the new step's card after an insert;
- the moved step's card (or its remaining tool button) after indent or outdent.
Each control's accessible name includes the step's name or position, for example "Move step 2 (Condition) up" and "Insert step before step 2".
Acceptance criteria #
Out of scope #
- Moving a step between levels with up/down: this stays with indent/outdent.
- The insert-control spacing and visual design.
- Drag-and-drop behaviour.
Queued: the loop will work on this version of the issue.
loop:queued cid=bafyreidcdu2z7ornxd2l6fx672zizcuclxoosjvjek7catzyhylztvafb4