On Our Radar This Week: Zombies and UX Gaffes

Yeah, that was a good one!

I thought of that article again today when I was working on a client’s site and wanted a “back to top” feature (which should take you back to the top of the page from the foot of a long text).

So I wrote:

<a href="#top">ˆBack to the top</a>

$("a[href='#top']").click(function(e) {
  e.preventDefault();
  $("html, body").animate({ scrollTop: 0 }, "slow");
});

and thought “Sorted!”

Then I thought," what if someone has JS disabled?" and added one extra line after the opening <body> tag:

 <a name="top"></a>

Now it works for everyone.

And that’s the thing about accessibility - sometimes, just a little extra thought can go a long way.

2 Likes