WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: skip link breaks back button

for

From: Patrick H. Lauke
Date: Mar 17, 2014 4:50AM


On 17/03/2014 10:40, Alastair Campbell wrote:
> 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.

If you hit back the first time, it should take you back to the top of
the document.

See for instance http://webaim.org/articles/visual/colorblind, hit the
"Designing for Color-blindness" in-page link, then hit back - normally,
this should take you back to the top, where you activated the in-page
link, but it doesn't.

I have some half-formed solution in my head involving the history API
(basically, once you hit an "enhanced" in-page link, store the current
location within the document, and if user goes back in history/hits
back, run additional script that does the exact same thing -
programmatically setting focus - in reverse to take you back to where
you clicked the in-page link).

P
--
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke
http://flickr.com/photos/redux/ | http://redux.deviantart.com
twitter: @patrick_h_lauke | skype: patrick_h_lauke