Paul Boag

Don't break the default browser behaviour

Published:
27 October 2005
Categories:
User Experience
Reading time:
2 minutes

Isn’t it fun how sometimes you think you are being helpful when in fact you are making things far worse? Take for example the small piece of JavaScript this site uses to focus the cursor in the search box.

Better User Experiences with AI

Join Paul Boag for 4 live online sessions in November and learn how to use AI to understand your users, improve what you build and design AI features people trust. Early-bird tickets are £195 + VAT until 30 October.

Book your place →

You would have thought that after more than 10 years in web design I would have learnt my lesson by now. Before you do anything on the web, carefully consider the consequences.

Just trying to help

One day I was loading up Google when I noticed that it had automatically places by cursor in the search box. "Great", I thought, "That saves the user having to select the field before they start typing their keywords. I will have to do the same thing on boagworld". Without another thought, I looked around in Google’s code, found the piece of JavaScript and added it to my site.

The consequences

Over a year later I was writing yesterday’s post and trying to add a link for users to add their comments at the end of the post. I wanted the link to jump directly to the comments block at the bottom of the page. "Easy" I thought, "Just add #Name of ID at the end of the address". I was therefore amazed when for some reason this didn’t work and instead jumped the user halfway down the page for no reason.

It took me some time to realise that the JavaScript was jumping the user back up to the search box, which was about half way down the page. Suddenly, for the first time I was thinking about the consequences of that tiny bit of JavaScript. I realised not only would # links not work but that there were other costs of focusing on the search box. I realised that:

  • I was breaking the tab order for users who couldn’t use the mouse very well.
  • there is a strong possibility that speech browsers will start reading from the position of the cursor rather than the top of the page (I have yet to check this)
  • users at 800×600 are immediately jumped half way down the page rather than viewing it from the top

And the morale of this story…

The morale of this story is that insignificant changes to your site, especially those that mess with the default browser behaviour, can have huge consequences. It is not enough to presume that because it works successfully on another site that it will be okay on yours.

  • Free access to 3 books including Click! that teaches you how to encourage clicks without shady tricks.
  • Choose between multiple email courses.
  • Choose between in-house or freelancers and agencies content.
  • Learn from an expert with over 30 years experience.

About me

I’m a UX consultant and conversion troubleshooter with 32 years in digital. I help teams create user experiences that work; winning support, improving results, and making change stick.

Contact me

Email: [email protected]
UK Based – Clients in North America, Europe, Asia, Australia.

how I help

  • UX Strategy – Spot what’s blocking a great experience and get a clear plan to fix it.
  • Improving Conversion – Simple, evidence-based changes that make every click count.
  • Coaching & Leadership – A sounding board to help you lead with clarity and confidence.
  • Training & Workshops – Hands-on sessions, playbooks, and self-learning so your team keeps improving.