WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Where should focus be on page load?

for

From: Birkir R. Gunnarsson
Date: Dec 6, 2021 6:26AM


It's a case by case basis, e.g. should focus go directly to "username"
on a login page.
If there is no critical info about logging in before the login field,
it makes sense to place the focus there directly.
Like you said, if this a search results page, maybe put focus on the
search results heading. It ends up being a judgment call. If searching
reveals a whole new page ( you type in a phrase, click a search
button, and a new page loads) I'd rather start at the top and navigate
to "search results".
If the search results are dynamic (they get displayed as you type) or
only the search result component gets updated on the page, maybe put
the focus on the search results heading directly. Keep in mind that
you can only do that if user clicks a button to search, you never know
when they are done typing into the search input and you can't disrupt
them.

I've found that screen readers do not always follow your focus
placement, especially in browse mode, unless you are placing focus on
a focusable element.



On 12/6/21, Mark Magennis < <EMAIL REMOVED> > wrote:
> Bikir wrote: If it's a full page reload focus should go to the top of the
> page (its expected behavior).
>
> Mark replies: So you wouldn't agree that there are any special circumstances
> where focus should be placed at the start of the unique page content, such
> as on a search results page?
>
> Mark
> > > > >


--
Work hard. Have fun. Make history.