Can a keyboard user continue the workflow from the original control?
The original implementation failed the “Second row edit button” check. Expected edit-row-2 and observed open. The corrected implementation met both expectations on the same inputs.
What the control case missed
An assertion that the first trigger receives focus passes when it happens to be the opener. Open from a second row instead and the generic default target steals the keyboard user's place.
| Check | Expected | Original | Corrected |
|---|---|---|---|
| Default opener | open | open | open |
| Second row edit button | edit-row-2 | open | edit-row-2 |
What to check before merging
Record the actual opening element and restore focus when it still exists. Run a separate browser and keyboard check for an opener removed during editing. The model below verifies the choice of target ID.
Reproduce the recorded result
Download the Node.js fixture and run node run.mjs keyboard-focus-after-dialog with Node.js 24. Compare the printed JSON with the recorded results. This is a locally executed model of the regression, using synthetic inputs. It covers the rule shown here. Hosted runs, browser behaviour and customer PRs require their own evidence.