WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: [EXTERNAL] set cursor in search box

for

From: Mark Magennis
Date: Jun 26, 2019 2:49AM


Hi Kirsty,

Placing focus on a field or at any other point on a page on page load is usually not a good idea, partly because as Patrick says, there's a chance of missing important context, but also because it goes against user expectations. Users expect focus to be at the start of the page when it loads. So you should leave it there.

However, there are rare exceptions where it does make sense to place focus at a specific point on the page. This is where you can guarantee that all users will want to go to that point when the page opens. An example is a search results page. When the search results page opens, it will be because the user has just submitted a search and they will want to read the results. You can guarantee this. So it makes sense to set focus to the main page heading which is usually the overall results statement like "Showing 20 of 13,682 matches for Elvis Presley".

Other exceptions occur within multi-step processes such as ticket booking where at each step the user always wants to go to the start of the step instructions or inputs. So it may be helpful to place them there.

This is just my opinion of course and having discussed this with some users (nothing like a representative or large enough sample to draw firm conclusions), I've found some who disagree and would rather it was always left at the top of the page.

So use with care and if possible test it on some users.

Mark Magennis
Skillsoft | mobile: +353 87 60 60 162
Accessibility Specialist