WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Detecting keyboard usage

for

From: Alastair Campbell
Date: Sep 18, 2013 4:12AM


Joe Chidzik wrote:

> What about having hidden link at the top of the page. If this received the
> focus, you would know it was via the keyboard, and could use this as a
> trigger to pause the carousel.
>

I was trying to detect focus on a link (or keypress), check out the test
page:
http://alastairc.ac/testing/detect-keyboard.html

The problem is that neither event will reliably fire when you use a Windows
screenreader to navigate with arrows or other browse mechanisms (e.g. skip
headings). It's a problem for me, but perhaps there are lots of examples
where sites would accidentally capture arrowing?


Though, would a simpler solution not be to just let the carousel run
> through once, and then pause for all users, regardless of input
> methodology? It is likely that even with judicious keyboard detection, some
> keyboard users will slip through the net.
>

The simplest would be to not use a carousel, but I'm afraid we are stuck
with one that must auto-rotate, we did well to get the pause button in!
Even if it ran through once, you could navigate into it whilst it runs and
get bounced-out as it changes.

Thanks,

-Alastair