Where to focus if an item disappears from a web page

I have an interesting question about focus on web pages. This is mainly due to mouse and keyboard interaction. Say I have an array of objects on a web page in which you are "Focused" or selected, and there is a way to navigate them using the tab. If an element has a delete button and I click on it, what should happen with the focus?

My theory is that the focus should disappear, because the element that acts on the gain, focuses and subsequently disappears. This creates a strange situation in which focus is then given to the root element, and tabbing then moves to the top element of the page.

I would like to hear some opinions on this matter.

+4
source share
3 answers

If you have an array of objects, make sure that when the object focused at the moment disappears, the previous object becomes in focus. This seems to me the most user-friendly. I believe that you can use jQuery to accomplish this.

0
source

Often in the list of elements, if you focus on the Nth element, then remove the Nth element, the focus remains on the Nth element, as counted against the updated (shortened) list of elements.

This is true for, for example, spreadsheets and email clients.

0
source

Without the additional context of what you are deleting and what other controls or headers are nearby, it's hard to say what should focus. However, this should not be the root element, as it is very disorienting. http://www.w3.org/TR/wai-aria/usage

0
source

Source: https://habr.com/ru/post/1398319/


All Articles