[w3c/permissions] Semantic Permission Bundles (#191)

In https://github.com/w3c/deviceorientation/pull/68#discussion_r265404566, @cdumez wrote the following:

> [A]ll I can say is that I find the terms "accelerometer", "gyroscope" and "magnetometer" confusing when it comes to [the [DeviceOrientation Event](https://w3c.github.io/deviceorientation/)] specification. As in it is not obvious which string relates to which event.

Has there been any previous discussion around *specifying a semantic grouping of lower-level permissions to form higher-level permission "bundles"* (in lack of a better term)? For example, for motion sensors access, the permission an app would request could potentially just be `"motion-sensors"` rather than all of `"accelerometer"`, `"gyroscope"`, and `"magnetometer"`?

This would arguably be more intuitive both for *developers* needing motion sensor data (but maybe unaware of the underlying sensor mechanics) as well as for *end users* who would need to make a decision when prompted.

User agents *could* already now present such lower-level access requests grouped (as outlined in https://github.com/w3c/permissions/issues/92#issuecomment-216825056), however, this requires the user agent to recognize that certain permissions belong together (in the code, they could be requested parallelly or serially, or maybe with `navigator.permissions.requestAll()`), and different user agents might handle this differently, which may be either good or bad, depending on one's viewpoint. 

Looking at the [permission registry](https://w3c.github.io/permissions/#permission-registry), another candidate for permission bundles could be (`"camera"` + `"microphone"` = `"camera-microphone"`). Or—maybe more visionary and with a to-be-bikeshed name—also (`"background-fetch"` + `"background-sync"` + `"persistent-storage"` + `"clipboard"` = `"web-application"`).

I reckon that this is somewhat orthogonal to the static method approach `DeviceMotionEvent.requestPermission()` from @cdumez' https://github.com/w3c/deviceorientation/pull/68 in the concrete case, and more aligned with what @reillyeon commented on in https://github.com/w3c/deviceorientation/issues/57#issuecomment-447129020.


(CC: @anssiko)
(Related issue: https://github.com/w3c/permissions/issues/92)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/191

Received on Thursday, 14 March 2019 11:09:19 UTC