w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
328 stars 55 forks source link

DeviceOrientation Event Specification #928

Closed anssiko closed 6 months ago

anssiko commented 7 months ago

こんにちは TAG-さん!

I'm requesting a TAG review of DeviceOrientation Event Specification.

This specification defines several DOM events that provide information about the physical orientation and motion of a hosting device.

Further details:

You should also know that...

This spec initially reached CR in August 2016 (history) and was retired in 2017 due to the Geolocation WG closure. In 2019 DAS WG adopted this spec and during 2019-2024 made substantial interoperability, test automation, privacy and editorial improvements as outlined in the changes section.

These changes since the previous CR Snapshot from 2016 align the specification with widely available implementations, improve interoperability including testability, and add new features for enhanced privacy protections.

This is a high-level API whose low-level API correspondence Orientation Sensor was reviewed by TAG in https://github.com/w3ctag/design-reviews/issues/207 The functional diff is explained in high-level vs. low-level and Orientation Sensor.

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

anssiko commented 7 months ago

We've indicated to horizontal groups we'd like to get feedback by 2024-02-29. Making good progress, overall HR status tracked in https://github.com/w3c/deviceorientation/issues/130

We provided an executive summary in the "You should also know that..." part. We hope context this helps. TL;DR: this update aligns the specification with widely available implementations. WebApps WG is now on board, so we're able to publish this jointly with all implementers represented. Thanks for your support.

torgo commented 6 months ago

Hi @anssiko - thanks for sending this our way and thanks for the additional metadata.

We're largely happy from an architectural point of view and I appreciate this is an update to an existing spec and that there is multi-implementer consensus - so great!

In line with generally tightening up our privacy-related guidance, we have just updated our wording in the Design Principles about exposing identifying information about devices and I'd like to draw your attention to it: In our new guidance in 9.1, we say "A web app should not be able to distinguish between the user rejecting permission to use a sensor/capability, and the sensor/capability not being present." From our read on the current spec, it's not clear what the behaviour is if a user rejects permission. Can you clarify?

anssiko commented 6 months ago

@torgo thanks for your review and updates to the Design Principles. I'm happy to hear the additional metadata about the spec's history and high-level status was considered useful.

Regarding your guidance and question:

"A web app should not be able to distinguish between the user rejecting permission to use a sensor/capability, and the sensor/capability not being present."

My understanding is the spec complies with your newly added guidance, because https://www.w3.org/TR/permissions/#dfn-denied is defined as: "The user, or the user agent on the user's behalf, has denied access to this powerful feature".

@reillyeon and @rakuco to correct me.

With this, we acknowledge the receipt of your feedback and will consider your review completed. Thank you!

(FTR: related design discussion https://github.com/w3c/deviceorientation/issues/74 resulted in changes https://github.com/w3c/deviceorientation/pull/123 to match WebKit's behavior.)

reillyeon commented 6 months ago

The specification currently seems to violate the updated TAG guidance because when no permission is granted no event is fired while when the sensors are unable to provide readings (either entirely or for a particular feature e.g. the gyroscope) an event with those readings set to null is fired.

anssiko commented 6 months ago

(FTR: TAG guidance "exposing identifying information about devices" is now noted in an issue https://github.com/w3c/deviceorientation/issues/148)

torgo commented 6 months ago

Hi @anssiko & @reillyeon - First of all, thanks for raising the issue in your repo in response to our feedback. We're happy to close the review on that basis.

...and... It's clear we need some harmonisation between the TAG guidance on devices and powerful features and what the WebAppSec group has developed around this topic. Thanks for bringing that to our attention. We've opened up an issue on our design principles doc https://github.com/w3ctag/design-principles/issues/481 to track.