You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -157,57 +157,106 @@ This is often used to attempt to trick users into visiting scam websites.
157
157
If this feature was proposed today, it would probably not proceed.
158
158
</p>
159
159
160
-
<h3 id="consent">Ask users for meaningful consent</h3>
160
+
<h3 id="user-intent" oldids="consent">Design for user intent</h3>
161
+
162
+
Use your API design to encourage websites to
163
+
meet user expectations when accessing potentially unsafe capabilities.
161
164
162
165
In the context of fulfilling a user need,
163
166
a web page may want to make use of a feature
164
167
that has the potential to cause harm.
165
-
Features that have this potential for harm should be designed such that people can give
166
-
[meaningful consent](https://www.w3.org/TR/ethical-web-principles/#control) for that feature to be used,
167
-
and that they can refuse consent effectively.
168
-
169
-
In order to give *meaningful consent*, the user must:
170
-
- **understand** what permission they may choose whether to grant the web page
171
-
- be able to choose to give or refuse that permission **effectively**.
172
-
173
-
If a feature is powerful enough to require user consent,
174
-
but it's impossible to explain to a typical user what they are consenting to,
175
-
that's a signal that you may need to reconsider the design of the feature.
176
-
177
-
If a permission prompt is shown,
178
-
and the user doesn't grant permission,
179
-
the Web page should not be able to do anything
180
-
that the user believes they have refused consent for.
181
-
182
-
By asking for consent,
183
-
we can inform the user of what capabilities the web page does or doesn't have,
184
-
reinforcing their confidence that <a href="#safe-to-browse">the web is safe</a>.
185
-
However, the <a href="#priority-of-constituencies">user benefit</a>
186
-
of a new feature must justify the additional burden on users
187
-
to decide whether to grant permission for each feature
188
-
whenever it's requested by a Web page.
168
+
Using such a feature should only be possible
169
+
if the user's expectation matches the feature's consequences
170
+
(e.g., the personal information it reveals or the state it changes).
171
+
172
+
Design your API so its behavior matches what people intend and expect.
173
+
Then, in the best case, people don't need to get involved in allowing API access
174
+
and thus can't make decisions they regret later.
175
+
Only ask the user for confirmation in exceptional circumstances.
176
+
If a capability can be easily reverted or causes only mild annoyance without the chance for permanent harm,
177
+
afford users an option to stop capability access instead.
178
+
179
+
<p class="example">
180
+
For example, web pages don't need to ask for permission to play sounds.
181
+
It is easy to stop audio output if a site is found to be abusing it,
182
+
and browsers have a number of mechanisms for doing just that.
183
+
</p>
184
+
185
+
<h4 id="user-decisions">Help users make good decisions</h4>
186
+
187
+
Empower good decision-making by limiting risk at the API level and
188
+
providing clarity, context, and user control.
189
+
190
+
Asking for user approval has been a common way to handle the remaining risk.
191
+
However, people often can't make good decisions on
192
+
the questions they're asked
193
+
because they lack crucial context and information.
194
+
Being confronted with difficult or annoying questions leads
195
+
to decision fatigue, habitual responses,
196
+
annoyance from frequent interruptions, and regrettable decisions.
197
+
198
+
When user involvement is unavoidable,
199
+
empower users to make good decisions.
200
+
Use these principles:
201
+
202
+
<ul>
203
+
<li> **Limit the consequences from a bad decision by addressing risk at the API level first.**
204
+
Do not ask users questions where a "bad" decision can lead to severe consequences,
205
+
like a compromised device or serious personal data disclosure.</li>
206
+
<li> **Provide constant feedback about persistent decisions.**
207
+
If users' decisions last longer than the current session,
208
+
user agents should remind users that their past decision still applies.
209
+
Provide a way to retract any ongoing permission.
210
+
APIs should include a way for sites to learn of the change in status.</li>
211
+
<li id="ask-understandable-questions"> **Ask questions people can understand.**
212
+
When a typical user reads the question about a feature,
213
+
they should immediately think of the associated risks.
214
+
The risks should also be directly connected to the feature's or API's utility.
215
+
For example, this usually means we can't ask permission to accept fingerprinting risks,
216
+
as they are subtle, technical, and commonly have nothing to do with the capability itself.</li>
217
+
<li> **Provide sufficient context.**
218
+
People need to easily understand who they're dealing with,
219
+
what the decision is about, and how the website will use any information they might share.</li>
220
+
</ul>
221
+
222
+
If you can't adhere to all of the above principles,
223
+
that is likely an indication that asking the user isn't the right approach.
224
+
Instead, change the feature or API to address any remaining risk.
225
+
226
+
<div class=note>
227
+
228
+
A browser is responsible for managing requests for permission.
229
+
Browsers will not be able to understand
230
+
precisely how a user's interaction with a site
231
+
might result in a reasonable expectation of a permission request.
232
+
The web platform provides sites with many ways
233
+
either to communicate purpose and intent,
234
+
or to employ deception and trickery.
235
+
236
+
The responsibility for clearly communicating intent is therefore shared
237
+
between the design of APIs,
238
+
user interface design in browsers,
239
+
and how websites are constructed.
240
+
It is preferable if respect for user intent
241
+
is a natural outcome
242
+
of following the simple, obvious, or default usage pattern for the API.
243
+
This principle only asks that API designs encourage
244
+
to construct sites that respect user intent.
245
+
</div>
189
246
190
247
In your specification, the [=request permission to use=] and [=prompt the user to choose=] algorithms from [[permissions]] are good ways to ask for consent.
191
248
249
+
If you ask a user to make a decision and they say no,
250
+
the website shouldn't be able to do anything
251
+
the user believes they just refused access to.
252
+
For example, if the user agent asks permission to reveal a piece of information via one API,
253
+
the same information shouldn't be available with no permission via a different API.
254
+
192
255
Refusal is most effective if the site cannot
193
256
distinguish refusal from other, common situations.
194
257
This can make it more difficult for a site to
195
258
pressure users to grant consent.
196
259
197
-
<p class="example">
198
-
For example,
199
-
the [Geolocation API](https://www.w3.org/TR/geolocation-API/)
200
-
grants access to a user's location.
201
-
This can help users in some contexts,
202
-
like a mapping application,
203
-
but may be dangerous to some users in other contexts -
204
-
especially if used without the user's knowledge.
205
-
So that the user may decide whether their location may be used by a Web page,
206
-
a permission prompt should be shown to the user asking whether to grant location access.
207
-
If the user refuses permission,
208
-
no location information is available to the Web page.
209
-
</p>
210
-
211
260
See also:
212
261
213
262
* [The web is secure, and respects people's privacy](https://www.w3.org/TR/ethical-web-principles/#privacy)
@@ -239,7 +288,7 @@ actively collected (for example, they have filled in a form).
239
288
For such features, you should [understand the context](https://www.w3.org/TR/privacy-principles/#identity)
240
289
in which it will be used,
241
290
including how it will be used alongside other features of the web.
242
-
Make sure the user can [give appropriate consent](#consent).
291
+
Make sure to [design for user intent](#user-intent) and [help users make good decisions](#user-decisions).
243
292
Design APIs to collect
244
293
[the smallest amount of data](https://www.w3.org/TR/privacy-principles/#data-minimization)
245
294
necessary.
@@ -363,7 +412,7 @@ APIs should also provide granularity and user controls,
363
412
in particular over <a href="https://www.w3.org/TR/privacy-principles/#dfn-data">personal data</a>,
364
413
that is communicated to sites.
365
414
When additional functionality requires additional data, APIs can enable this
366
-
subject to user consent (e.g., a permission prompt or user activation).
415
+
if they [design for user intent](#user-intent) and [help users make good decisions](#user-decisions) when necessary.
367
416
368
417
<div class=example>
369
418
A <a href="#font-enumeration">Font Enumeration API</a> API was once proposed, but the tradeoff of user data exposed was not justified by the use cases. Instead, an alternative solution was proposed, which only exposed the font the user actually selected.
@@ -581,8 +630,7 @@ if feature detection were available for the feature,
581
630
then you should not support feature detection.
582
631
583
632
Detecting the availability of a feature does not imply
584
-
detecting whether <a href="#consent">consent</a> to use the feature
585
-
has been granted.
633
+
detecting whether [the user has been asked](#user-decisions) to use the feature.
586
634
Generally, detecting whether the feature is implemented
587
635
can be done separately from determining whether use of the feature has been authorized.
588
636
In some cases, it might be necessary to disable feature detection
@@ -601,7 +649,7 @@ See also:
601
649
* [[#do-not-expose-use-of-private-browsing-mode]]
602
650
* [[#do-not-expose-use-of-assistive-tech]]
603
651
* [[#secure-context]]
604
-
* [[#consent]]
652
+
* [[#user-decisions]]
605
653
606
654
<h3 id=text-formats>Design textual formats for humans</h3>
607
655
@@ -765,8 +813,7 @@ a single user’s activity
765
813
both in and out of private browsing mode,
766
814
consider possible [mitigations](https://www.w3.org/TR/security-privacy-questionnaire/#mitigations)
767
815
such as introducing noise,
768
-
or using permission prompts to give the user extra information
769
-
to help them meaningfully consent to this tracking (see [[#consent]]).
816
+
or [helping users make good decisions](#user-decisions) about this tracking, if necessary.
770
817
771
818
Private browsing modes enable users to browse the web
772
819
without leaving any trace of their private browsing on their device.
@@ -861,8 +908,8 @@ once per API call ([transient consuming](https://html.spec.whatwg.org/#activatio
861
908
862
909
Note that while user activation is in many cases necessary,
863
910
it is not always *sufficient*
864
-
to protect users from invasive behaviours,
865
-
and seeking [meaningful consent](#consent) is also important.
911
+
to protect users from invasive behaviours.
912
+
[Designing for user intent](#user-intent) and [helping users to make good decisions](#user-decisions) is also important.
866
913
867
914
<h3 id="support-non-fully-active">Support non-fully active BFCached documents</h3>
868
915
@@ -2114,7 +2161,7 @@ Promise-using code also tends to be easier to understand
2114
2161
than code using callback functions.
2115
2162
2116
2163
An API might need to be asynchronous if:
2117
-
* the user agent needs to prompt the user for [permission](#consent),
2164
+
* the user agent needs to prompt the user for [permission](#user-decisions),
2118
2165
* some information might need to be read from disk,
2119
2166
or requested from the network,
2120
2167
* the user agent may need to do a significant amount of work on another thread,
@@ -3062,9 +3109,8 @@ use these guidelines when exposing device information:
3062
3109
: Hide sensitive information behind a user permission
3063
3110
:: If you can't create a device identifier in an anonymous way,
3064
3111
limit access to it.
3065
-
Make sure the user can provide
3066
-
[[#consent|meaningful consent]]
3067
-
to a Web page accessing this information.
3112
+
Make sure you [help the user make good decisions](#user-decisions)
3113
+
about a Web page accessing this information.
3068
3114
: Tie identifiers to the same-origin model
3069
3115
:: Create distinct identifiers for the same physical device
3070
3116
for each origin that has has access to it.
@@ -3085,7 +3131,7 @@ use these guidelines when exposing device information:
3085
3131
3086
3132
See also:
3087
3133
3088
-
* [[#consent]]
3134
+
* [[#user-decisions]]
3089
3135
* [[LEAST-POWER]]
3090
3136
* [[FINGERPRINTING-GUIDANCE]]
3091
3137
* [[UNSANCTIONED-TRACKING]]
@@ -3109,7 +3155,7 @@ you may not need to expose a list to script at all.
3109
3155
An API which invokes a User-Agent-provided device picker could suffice.
3110
3156
Such an API:
3111
3157
- keeps the user in control,
3112
-
- doesn't expose any device information without the user's [consent](#consent),
3158
+
- [helps users understand](#user-decisions) their decisions,
3113
3159
- doesn't expose any fingerprinting data about the user's environment by default, and
3114
3160
- only exposes information about one device at a time.
3115
3161
@@ -3119,6 +3165,8 @@ the fact that there are devices are available to be picked.
3119
3165
This does expose one bit of fingerprinting data about the user's environment
3120
3166
to websites,
3121
3167
so it isn't quite as safe as an API which doesn't have such a feature.
3168
+
Ensure that such an API ensures that it is possible to present sufficient information
3169
+
on user interfaces that users are able to [make good decisions](#user-decisions).
0 commit comments