-
Notifications
You must be signed in to change notification settings - Fork 64
Add support for approximate geolocation #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This commit introduces the ability for users and developers to request a less precise, privacy-preserving "approximate" location. Key changes include: - A new `accuracyMode` option in `PositionOptions` to request either "precise" or "approximate" location. - A new `geolocation-approximate` permission and policy, which is implicitly granted if the "geolocation" permission is given. - Separate internal caching for precise and approximate positions. - Updated "Request a position" and "Acquire a position" algorithms to handle the new accuracy levels, permission fallback, and caching logic. - The `GeolocationPosition` interface now includes an `accuracyMode` attribute to reflect the accuracy of the returned position. - Expanded privacy and user consent sections to discuss the benefits and user interface implications of approximate location.
index.html
Outdated
</p> | ||
<p> | ||
To better protect user privacy, this specification also provides a way | ||
for users to share an <em>approximate location</em> instead of a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should define all our terms here with <dfn>
tags so we can refer back to them elsewhere in the spec.
I think we should define "approximate location" in a way that makes it clear it's an optional thing that some location sources support and some don't. The previous paragraph refers to "sources of location information", I think we should turn it into a proper definition and refer to it here.
Perhaps:
An <dfn>approximate location information source</dfn> is a [=location information source=] that returns positions that have been intentionally obfuscated to make it more difficult to recover the true location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently I added precise position and approximate position and approximate location information source to the introduction chapter. PTAL
For readability as you iterate on this proposal it's okay for this PR to directly change the specification text however to land this change the changes need to be enclosed in the correct candidate additions/corrections/deletions syntax. |
@reillyeon if it's ok, let's move this to CR first (i.e., let's not waste time with the ins/dels). We are close to publishing as CR again. |
index.html
Outdated
<aside class="example" title="Permissions Policy over HTTP"> | ||
<pre class="http"> | ||
Permissions-Policy: geolocation=() | ||
Permissions-Policy: geolocation=(), geolocation-approximate=() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about just writing
Permissions-Policy: geolocation-approximate=()
here and explaining in words that by disabling geolocation-approximate, geolocation will automatically be disabled too?
index.html
Outdated
permission|checks permission=] for the level of accuracy specified by | ||
the {{PositionOptions/accuracyMode}} option. A grant for the | ||
"geolocation" permission implies a grant for the | ||
"geolocation-approximate" permission. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add
"while if the "geolocation-approximate" is denied, then so is "geolocation""
"geolocation-approximate" permission. | ||
</p> | ||
<p> | ||
When <dfn data-local-lt="check permission">checking permission</dfn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll want to expand this and clarify that when requesting permission to use geolocation, the user will also be prompted for geolocation-approximate. This will probably require some changes to https://www.w3.org/TR/permissions/#dfn-request-permission-to-use so that that algorithm can be overridden, and we'll need to override it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean we should add the case when website request position using accuracy_mode='approximate', the prompt should show approximate option and denial only?
This commit introduces the ability for users and developers to request a less precise, privacy-preserving "approximate" location.
Key changes include:
Closes #182
Approximate Geolocation explainer
Preview | Diff