E-mail List Archives
Thread: Automatic Keyboard navigation via Javascript
Number of posts in this thread: 4 (In chronological order)
From: mhysnm1964
Date: Thu, Oct 26 2017 2:34AM
Subject: Automatic Keyboard navigation via Javascript
No previous message | Next message →
All,
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.
Sean
From: Patrick H. Lauke
Date: Thu, Oct 26 2017 3:18AM
Subject: Re: Automatic Keyboard navigation via Javascript
← Previous message | Next message →
On 26/10/2017 09:34, = EMAIL ADDRESS 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
From: Peter Krautzberger
Date: Thu, Oct 26 2017 4:52AM
Subject: Re: Automatic Keyboard navigation via Javascript
← Previous message | Next message →
> 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).
Just to add: it should be possible with many front-end testing tools (e.g.,
anything using Selenium).
Peter.
2017-10-26 11:18 GMT+02:00 Patrick H. Lauke < = EMAIL ADDRESS REMOVED = >:
> On 26/10/2017 09:34, = EMAIL ADDRESS 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
>
> > > > >
From: Roel Van Gils
Date: Thu, Oct 26 2017 11:39AM
Subject: Re: Automatic Keyboard navigation via Javascript
← Previous message | No next message
This sounds like a job for 'Fake' (a Mac app).
From their site (http://fakeapp.com):
> Fake is a new browser for Mac OS X that makes web automation simple. Fake allows you to drag discrete browser Actions into a graphical Workflow that can be run again and again without human interaction. The Fake Workflows you create can be saved, reopened, and shared.
I've used Fake in the past to do browser automation tests. If you're familiar with using Automator on the Mac, it's straightforward to use. I just checked and it has a 'Dispatch keyboard event' and a 'Focus HTML element' action. These should get you started, I think.
Good luck.
Roel
--
Roel Van Gils
Inclusive Design & Accessibility Expert at 11Ways
+32 473 88 18 06 / http://www.11ways.be / 'roelvangils' on Twitter, Skype and elsewhere
> On 26 Oct 2017, at 12:52, Peter Krautzberger < = EMAIL ADDRESS REMOVED = > wrote:
>
>> 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).
>
> Just to add: it should be possible with many front-end testing tools (e.g.,
> anything using Selenium).
>
> Peter.
>
> 2017-10-26 11:18 GMT+02:00 Patrick H. Lauke < = EMAIL ADDRESS REMOVED = >:
>
>> On 26/10/2017 09:34, = EMAIL ADDRESS 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
>>
>> >> >> >> >>
> > > >