WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: skip link breaks back button

for

From: Alastair Campbell
Date: Mar 17, 2014 4:40AM


I'm not sure I know what you mean by doesn't work?

If I use the webaim example, selecting back once doesn't appear to do
anything because you followed a link within the page. Selecting it again
does take you back a page.

Theoretically you could remove that action from the browsers history so
that selecting back takes you to the previous page (I think, I've not
messed with the browser history in JS before). However, I have a feeling
that would create new problems.

Perhaps selecting the skip link could alter the history to include the skip
link as that page? So once you've followed a skip link you'd have:

1. The last page (e.g. google.com search results)
2. The skip link (e.g. example.com/#skiplink)
3. The new location on the page (e.g. example.com/#targetOfSkipLink)

Then pressing back would (well, might, I haven't tested it) take you to the
top of the page, where you were before.

-Alastair