A delete dialog usually returns focus to the button that opened it. Confirm the deletion, though, and that button disappears with the row. Where should focus go next?
I built a small Astro example using Eris UI’s Dialog. Delete the first project and focus moves to the next row’s Delete button. Delete the bottom row and it moves to the previous one. Delete the only row and it lands on the Projects heading. Cancel or press Escape and focus returns to the original button.
The app picks the destination before removing the row. Eris UI uses finalFocus to focus that element when the dialog closes. I verified the keyboard paths in Chromium and WebKit.
Github: https://github.com/erisui/eris-ui
Website: https://erisui.dev
