WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: how to trash focus when sighted


From: Steve Green
Date: Dec 17, 2019 2:50PM

Create a bookmarklet with the following code:

javascript: console.log(document.activeElement);

When you want to know where focus is, trigger the bookmarklet. The JavaScript Console will show which element has focus.

There is also a bookmarklet called Force Show Focus, which you can get at http://pauljadam.com/bookmarklets.html. This forces a visible focus indicator onto elements.

Steve Green
Managing Director
Test Partners Ltd

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Reinhard Stebner
Sent: 17 December 2019 20:51
Subject: [WebAIM] how to trash focus when sighted

I am working with a developer who is attempting to develop a custom select list box. Is there a tool to help track where programmatic focus when particular events are being fired? For example when enter or a arrow key is pressed? Thsi develoepr is sighted and is learning how to develop with aria and how to manage focus in custom JavaScript based applications.
or a