digital-analytics-program / gov-wide-code

Provides a set of javascript files and documentation to implement web analytics on US federal websites
http://www.digital.gov/dap
104 stars 55 forks source link

Link autotracker doesn't account for keyboard users #46

Closed toolness closed 6 years ago

toolness commented 8 years ago

It looks like the auto-tracking code (specifically _tagClicks()) is binding event handlers to mousedown, and as a result, it won't track the activity of keyboard users who press Enter to activate links.

I'm not sure if this is a big deal or not, but I figured I'd mention it.

I think it could probably be fixed by binding to keydown in _tagClicks() and filtering based on whether Enter was pressed.

tdlowden commented 8 years ago

This is a fantastic catch! Thank you. Passing on for our 3.2 version feature updates.

tdlowden commented 6 years ago

We added this to our 4.0 code and we're demoing it on a webinar Wednesday!