In the UI design, each item panel contains a remove button. If clicking the remove button, a confirmation dialog would prompt. If cancel, the keyboard would focus back to the remove button. If confirm, the item would be removed, so the remove button in the panel which open the confirmation dialog would also be removed. In this case, where should the keyboard focus after the item removed?


The focus should go to the next item. In that way you can go easily go through each item and delete it.

  • Do you mean the delete button of the next item or the next item itself? – T.Liu Oct 1 '18 at 17:28
  • I don't know which actions are available besides delete. If delete is the only action, yes, focus on that. The problem with the word 'focus' is that for web, it's very specific to form elements and an item is not a form element and thus can't be focused, unless you mean a checkbox? – bart Oct 1 '18 at 17:31
  • Yes, the delete is the only action, which is a button. And the item is a div. I didn't add tabindex to div, so it will focus on the next delete button. – T.Liu Oct 1 '18 at 17:40
  • 1
    If deleting is the main purpose of that list, then focus on the delete button. – bart Oct 1 '18 at 18:10
  • 1
    +1 for the emphasis on being able to easily go through the list and delete multiple items. The exact control the focus returns to is less important than facilitating the likely interactions. – Nathan Rabe Oct 1 '18 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.