I’m modernizing referenceTooltips gadget (present in enwiki, ruwiki and many other Wikipedia editions), and I’m willing to aid accessibility effort by giving access to <abbr>
elements titles (see also T130011) and other content hidden in native tooltips for touch-only devices via gadget tooltips which are available with touch.
But what is the best way to detect touch-only users, possibly using MW APIs? 'ontouchstart' in document.documentElement
isn’t enough because there are touch laptops with mouse, and we need specifically touch-only devices. $.client.profile().name
seems to have a high error rate, returning android
for mobile Chrome and chrome
for native Android browser.
I would like to add that we don’t need 100% accuracy here: we need at least a huge portion of touch-only users to process native browser tooltips for them.