WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Detecting keyboard usage

for

From: Cameron Cundiff
Date: Sep 17, 2013 6:37AM


According to NVDA's bug tracker<http://community.nvda-project.org/ticket/57>;,
browser focus should track the virtual cursor. I think the real problem may
be that Firefox does not support the
`focusin`<https://bugzilla.mozilla.org/show_bug.cgi?id=687787> event.
Try the `focus` event instead.

Though it may not make any difference, delegate() in jquery is deprecated
as of jquery 1.7, use on() instead.


On Tue, Sep 17, 2013 at 8:10 AM, Alastair Campbell < <EMAIL REMOVED> > wrote:

> Hi everyone,
>
> I've an odd issue with accessibalising a carousel. Yes, yes, I know we
> shouldn't use them, that's not an option here.
>
> It already has a visible pause button, alt text etc etc.
>
> The issue is that I would like it to pause automatically when a keyboard
> user is interacting with the page. (Again, I know that isn't ideal, but it
> "has to" auto-play.)
>
> That is straightforward to do with non-screen reader usage, you can detect
> use of the tab key and pause it.
>
> I thought detecting focus would be ideal, and with a little
> experimentation:
> http://alastairc.ac/testing/detect-keyboard.html
>
> I can detect "focusin", and it works with people tabbing, and with
> VoiceOver.
>
> However, in NVDA (due to the virtual cursor approach I assume) the event is
> not triggered, i assume it would be the same for Jaws.
>
> It is a similar story for use of the arrow keys, they don't get passed on.
> Does anyone know of a reliable way of detecting keyboard usage? (And why
> doesn't this impact ARIA widgets?)
>
> Regards,
>
> -Alastair
> > > >