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.
- WebKit (Apple WebKit): https://bugs.webkit.org/show_bug.cgi?id=72715.
- Chromium (Google Chrome; Opera): https://bugs.chromium.org/p/chromium/issues/detail?id=393466.
However, while the Chromium report has seen activity, it seems to be suggesting it's not used or useful, referencing:
- Proposal to remove it from the spec: https://github.com/whatwg/html/issues/838.
- Proposal to create an alternate more elaborate and machine-readable interface: https://github.com/chaals/accessKeyLabel.
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' ); } );