6

I've stumbled on this very obvious idea while working on a website with a lot of interactive items that lead to separate pages. Initially I thought it might be useful for users to have the last clicked or focused element on the page regain focus when user navigates back in history, so he/she could continue to tab their way through down the page - especially if the list of such elements is long enough.

I've also discovered this 17(!)-years old ticket for Firefox, still unresolved. However there are no other expert opinions/strong arguments there that this feature might be desirable or undesirable. It is also claimed there that IE5 supported this, but I cannot say the same for IE11 — maybe they have this removed?

So should we consider restoring focus to the last clicked or focused element on a webpage a bad or good practice?

  • I don't have any deep answer to share so I will comment it: why not? I actually think it's a good detail and help the user understand where in the previous website he/she clicked to bring to the last website the user was. – Joao Carvalho May 31 '17 at 13:18
  • I would say it depends on how granular you want the history to become. If the user can step back through each action on a page then going back two pages could be really time consuming if the middle page is a complex form. This then leads to needing two back buttons: one to move between pages and another to move between actions. Of course, we also have the 'undo' function which, although it doesn't fully cover the idea of an action level back button, does go a long way to solving the problem. It's more complicated than you think. – Andrew Martin May 31 '17 at 14:53
  • 1. I actually do think it's complicated, that's why I posted this question. 2. Good example with form inputs being focused. So at least one practical tip for someone who would be very keen on implementing this is to avoid applying this feature to inputs (or any interface element blocking further page level action). 3. What about the undo, I haven't fully understood what you mean here... Usually it's impossible to undo focus action in browser, so not sure how it applies here. – certainlyakey May 31 '17 at 15:24
  • @AndrewMartin I think the question is only related with moving between web pages only, not actions and that's how a browser history works. – Joao Carvalho Jun 1 '17 at 7:06
1

For accessibility reason you don't want the focus being on the bottom of the page for any reason: if you click the back button it means that you want to navigate to the previous page (not the previous action). If you navigate to a page, you want to scan it from the top to bottom, especially if you are dealing with forms where the choices made on the top of the form may affect the lower part of it.

[...] the order in which interactive items receive keyboard focus is important. The default keyboard navigation order must be logical and intuitive. This generally means that it follows the visual flow of the page: left to right, top to bottom [...]

from webaim.org

Having to tab through a form in reverse order may be counter-intuitive for the most people. I can think this could be useful only for advanced users, that knows your website pretty well, and they need to to edit the last input fields submitted as fast as possible.

If you are concerned about the fact that a user would need too much time to navigate through all the inputs of a page to reach the bottom of the form, maybe you should split the inputs of the form in multiple pages, like a wizard (or split it in more pages if you are already paging it).

0

I can't comment due to reputation, so I'll either edit this once more is known or feel free to prune it, but I don't see why this would be an issue, it could be useful.

However, is it perhaps against some sort of convention/pattern for accessibility reasons? Perhaps using a screen reader one would expect to be at a certain position upon navigating back.

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.