The problem with automatically focusing the first input and what to do instead

In 2009 I was working on the Argos checkout flow.

We were considering focusing the first input when the page loads. The idea was to save users a click (never a good sign). Back then we had to use JS, but now we have the HTML5 autofocus attribute.

Either way, automatically focusing the first input causes 5 specific problems that degrade UX.

Here they are:

Problem #1: it makes the page jump unexpectedly

When any normal web page loads, focus remains at the top.

With autofocus, focus jumps suddenly to the first input.

But this is disorientating and may cause users to think something has gone wrong.

Automatically focusing the input makes the page jump

Problem #2: it stops users scrolling with the keyboard

Users often scroll a web page after page load by pressing and .

With autofocus, the keys are ignored because the input is focused.

This makes the interface feel broken.

The up and down keys get ignored as focus is inside the input

Problem #3: it stops users going back with the keyboard

Some users navigate back by keyboard using #+← for example.

With autofocus, the shortcut is ignored because the input is focused.

This slows users down.

The keyboard shortcut to go back is ignored as focus is inside the input

Problem #4: it’s unexpected for screen reader users

When a web page loads, a screen reader announces the page title.

With autofocus, the input’s label is announced instead.

This is disorientating and causes users to lose context.

The screen reader announces the input instead of the page

Problem #5: it works badly on mobile

On mobile, focusing an input usually opens the keyboard.

With autofocus this doesn’t happen. On Android, for example, the input is focused but the user has to tap again to open the keyboard.

This makes the interface feel broken.

On Android, the input is focused but the user needs to tap

Just let users focus the first input

Good design puts users in control.