Page MenuHomePhabricator

Gather statistics on accesskey usage
Closed, DeclinedPublic

Description

We currently have an accessKeyLabel implementation that requires hardcoded knowledge of various browser's internals (see accessKeyLabel.js)

Starting with HTML5, there is a spec for browsers exposing their shortcut trigger via the DOM, and as of 2014 we use it when available (HTMLElement#accessKeyLabel), see also T39239.

However, three-four years later, Firefox is still the only browser that implements it.

However, while the Chromium report has seen activity, it seems to be suggesting it's not used or useful, referencing:

The new thing does seem nice, but it is a case of starting from scratch and that could take years to find agreement and widespread implementation. I'm hoping the existing approved standard from 10 years ago, with Firefox having implemented it, will at least be implemented by Chrome as well as improvement over the status quo.

To help communicate that desire, it might be useful if we could show the feature being actively used on Wikipedia et al.

I looked around in the DOM to detect a way of using it, and couldn't find any obvious way, but if/when I do, perhaps we should have a 1-2 week data gather (WikimediaEvents, statsv), for usage of accesskey triggers on all page loads.

Effectively:

var sendBeacon = navigator.sendBeacon, baseUri = mw.config.get( 'wgWMEStatsdBaseUri' );
if ( sendBeacon && baseUri )
    document.addEventHandler( atype, function ( e ) {
        if ( e.some.check )
            navigator.sendBeacon( baseUri + '?mw.some.metric=1c' );
    } );

Event Timeline

aaron triaged this task as Low priority.Jun 6 2019, 10:18 AM

Hard or impossible to track with JavaScript due to access keys being very good at simulating clicks. It would be indistinguishable from normal clicks, keyboard navigation, or AT. We might be able to approximate with some time-based heuristics between early key presses (e.g. "ctrl" and "alt") and the actual click, but not sure it's worth it.

Let's hope we can convince upstream by other means.