WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Automatic Keyboard navigation via Javascript

for

From: Patrick H. Lauke
Date: Oct 26, 2017 3:18AM


On 26/10/2017 09:34, <EMAIL REMOVED> wrote:
> Is it possible via Javascript to initiate a tab keypress and a shift tab
> keypress, and log the element which the keyboard focus moves too? I am just
> thinking of a way of logging the different elements keyboard focus moves to
> on the page without using Assistive Tech.

Unfortunately, no...as the handling of tab etc is at the browser level,
not at the page/document level (otherwise a webpage would be able to
send arbitrary "fake" key commands that trigger browser commands as well).

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