WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Where should focus be on page load?

for

From: Tim Harshbarger
Date: Dec 6, 2021 5:00AM


I think this issue is probably less confusing for screen reader users than
most people think. If the focus starts on some kind of form control, I
suspect screen reader users will assume they are not at the top of the page
but somewhere further in it. If it starts on a link, it probably depends on
whether or not the link sounds like it should be something at the top of the
page. For example, if the focus were placed on a skip link or a homepage
link a screen reader user might think they are at the top of the page. Once
a screen reader knows or suspects they are not at the top of the page and if
they want to go there, it is fairly trivial to accomplish that.

I suspect the location of the focus is more important to keyboard users. If
it goes to somewhere on the page they want to be or close to it, you saved
them a lot of tabbing. If it is not close to where they want to go, what
will it take to get them where they want to go?

Thanks,
Tim
Tim Harshbarger

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Mark
Magennis
Sent: Monday, December 6, 2021 4:30 AM
To: <EMAIL REMOVED>
Subject: [WebAIM] Where should focus be on page load?

I'd be interested in hearing the opinions of screen reader users or those
who are very familiar with screen reader users' experiences about where
focus should be when a page loads. I see this as a usability issue rather
than a compliance one.

The way I've always looked at this is that when a new 'page' is opened -
either a new URL or, in a single page application, a new distinct functional
chunk (vague I know), focus should normally go to the top of the page. This
helps with predictability and consistency. Only in exceptional circumstances
should focus be moved to somewhere else such as the start of the unique page
content.

In my thinking, exceptional circumstances are when the user is engaged in a
predictable workflow, where the current step leaves focus somewhere distant
from the content the user will predictably need to read or interact with
next. An example is a site search that opens a search results page. It is
predictable that after submitting the search the user will want to
immediately read the results. It's hard to imagine a scenario when this will
not be the case. So when the search results page open, it is helpful to
place focus at the start of the results, usually on a results statement such
as "Showing 20 of 1,483 results for xxxxx". Other predictable workflows
occur within multi-step processes such as purchasing or ticket booking where
at each step the user will always want to go to the start of the step
instructions or inputs. So it is helpful to place them there when the step
is loaded.

Am I looking at this the right way, or is it helpful to place focus at the
start of the unique content more often, even on most pages perhaps?

Aside from page loads, content changes with predictable workflows seem to
occur whenever hidden content is revealed or new content is added to a page.
For example, if a 'Show Table of Contents' button is used to open a content
navigation panel should focus be moved to the panel because it is
predictable that the user will want to use it (why would they have opened it
otherwise)? Or when an 'Add New Record' button in a table toolbar causes a
new row to be added to the table containing fields that need to be filled
in. It seems predictable that the user will want to immediately fill them
in, so should focus always be moved to the first field in the newly added
row?

Would be very interested to hear users' preferences. Thanks, Mark

Mark Magennis (he/him)
Senior Accessibility Specialist
Skillsoft | mobile: +353 87 60 60 162
www.skillsoft.com<;http://www.skillsoft.com/>;

[Skillsoft / Sumtotal]