Add telemetry for touchscreen use
Categories
(Core :: Widget, enhancement, P3)
Tracking
()
People
(Reporter: tjr, Unassigned)
References
Details
From our limited dataset, 23% of Windows users have some sort of touch screen, and therefore report a non-zero maxTouchPoints property. Of those users, 57% report 10, 35% report 1 and 6.5% report something else.
Because touch points is a very stable fingerprinting attribute it is used in every fingerprinting script we have looked at.
At the margins, we could collapse the unusual values to either 1 or 10, but the data indicates this gives very minimal results. Like .15% of all users become non-unique. Not wholly surprising to me; whatever is causing someone to have 40 or 6 touch points also results in other unusual values.
However, my hypothesis is that a significant number of people that have a touch screen just... don't use it. I have one myself and I use it sparingly. My proposal is that until a user has actually interacted with their touchscreen in Firefox, we report a maxTouchPoints of 0. We could be even more stringent and say that until they interact with this page using the touchscreen, the maxTouchPoints reports 0.
To see if this idea has legs I suggest adding telemetry that reports a boolean maxTouchPoints != 0 of a user's device, and a second boolean 'Has the user used the touch screen in Firefox in this session'. This will over-report how much the touchscreen is used: accidental touches will trigger the boolean even if it's never used again; but if this value is significant it could help make considerably more people less fingerprintable.
Comment 1•1 year ago
|
||
I don't think changing the value after user interaction is wise. Mac's don't have touch so 0 is fine. Mobiles have touch and you can just report everyone as 5 (it's capped). Spec says higher than actual is fine. Linux I am a little uncertain about due to startup commands may be required, but lets just say it matches windows in how it works. Windows example I will explain below
Windows + linux + android have dom.w3c_touch_events.enabled == default 2 == autodetect. Mac == default 0 = disabled. This pref exposes touch capability with various window and element properties
you can test here: https://arkenfox.github.io/TZP/tests/pointerevent.html
- real desktop touch has window: Touch, TouchEvent, TouchList
- android has
- element: ontouchcancel, ontouchend, ontouchmove, ontouchstart.
- window: Touch, TouchEvent, TouchList, ontouchcancel, ontouchend, ontouchmove, ontouchstart.
The reason Android exposes the ontouch* events and desktop doesn't is for legacy reasons so desktops aren't served mobile pages due to crappy website coding
Since the default is autodetect, my touch laptop differs from my non-touch desktop - regardless of the maxTouchPoints value - so a binary outcome (entropy). Returning 0 then changing it afterwards won't hide this. And returning maxTouchPoints !== 0 without the windows properties doesn't match real world. And returning 0 with devices that do have those window touch properties also doesn't match real world
This pref is currently at odds with RFP and at Tor Browser and I plan to change it. @piero FYI (just a bit confused about linux and touch startup commands)
On desktop where we enforce a maxTouchPoint value > 0 we will also enforce touch dom.w3c_touch_events.enabled = 1 (enabled). And we won't be changing properties after a website has loaded. I would think FPP should do the same. If a user doesn't use touch or doesn't have touch, everything is fine. If a user uses touch, we spoof pointer events as mouse etc. But there are other ways to detect this, such as watching point events and co-ordinates, and number of touch points used - but we consider this a lesser threat (user generated/activated/gestures - i.e not auto-magically grabbed by scripts on all sites)
Comment 2•1 year ago
|
||
I agree with Thorin that we could just always report 10 on Windows, 5 or 10 on Linux, either that we have touch or we don't.
Probably 5 would work also on Android (Android doesn't have an API to get the number of exact touch points, instead it tells you whether the device has touch/multitouch/full hand detection capabilities, but it's fine to say a lower number than the one actually supported, according to the spec).
There was another Bug for which I went through various specs (Windows, Linux/XInput, Android and HTML), but I don't remember which one was in this moment.
The only problem I see with always reporting that we have touch points is that a site might use it to require touch interactions, even if the user doesn't actually support it (/want to use it).
It shouldn't be a problem for FPP though, as users can add exemptions.
Comment 3•1 year ago
|
||
me
Spec says higher than actual is fine
piero
it's fine to say a lower number than the one actually supported, according to the spec
me 2 years ago: https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/28535#note_2848069
Additionally, looking at https://www.w3.org/TR/pointerevents/#extensions-to-the-navigator-interface, note the following
While a maxTouchPoints value of greater than 0 indicates the user's device is capable of supporting touch input, it does not necessarily mean the user will use touch input.
ok, so lets clarify: saying we have touch (maxTouchPoints, events) for devices that don't shouldn't impact users because the spec says code shouldn't rely on users using touch (another reason for never exposing ontouch events on desktop - shouldn't is doing some heavy lifting). Otherwise we would have had thousands of reports of broken websites over the period of touch enabled desktops.
Reporting a higher or lower maxTouchPoints than actual on a touch enabled device will only matter when a user actually uses touch. Android is capped at 5 and we've have no reports/issues that I know of e.g. website breakage with Android devices with 10 (like my new phone) - wonder where the spec says lower is fine (am lazy). We really only have three values: 1, 5 or 10. Could have sworn I read somewhere that reporting higher was fine as well
Comment 4•1 year ago
|
||
Reporting a higher or lower maxTouchPoints than actual on a touch enabled device will only matter when a user actually uses touch. Android is capped at 5 and we've have no reports/issues that I know of e.g. website breakage with Android devices with
10(like my new phone) - wonder where the spec says lower is fine (am lazy). We really only have three values: 1, 5 or 10. Could have sworn I read somewhere that reporting higher was fine as well
It's right below the note you cited 😂: https://www.w3.org/TR/pointerevents2/#extensions-to-the-navigator-interface
On platforms where the precise number of touch points is not known, the minimum number guaranteed to be recognized is provided. Therefore, it is possible for the number of recognized touch points to exceed the value of
maxTouchPoints.
Also, I found the comment I was looking for: https://bugzilla.mozilla.org/show_bug.cgi?id=1957658#c9
Comment 5•1 year ago
|
||
Ahh yes, Bug 1957658 is the one about tidying up the maxTouchPoints for RFP and I mentioned the touch events (pref) should match real world.
For spoofing the maxTouchPoints on desktop, e.g windows and/or linux, perhaps 5 is a safer bet than 10. I doubt people use more than 5 fingers so not likely to be picked up on (the value won't stop detection of how many touch points are concurrently used - we tested). And 5 may be more compatible, but we also haven't heard of any breakage spoofing as 10 in FF RFP yet.
Updated•1 year ago
|
Description
•