Skip to content

Commit 5b9b53c

Browse files
mharbachmartinthomsonjyasskinmarcoscaceres
authored
Replace asking for users for consent with designing for user intent (#584)
Co-authored-by: Martin Thomson <[email protected]> Co-authored-by: Jeffrey Yasskin <[email protected]> Co-authored-by: Marcos Cáceres <[email protected]>
1 parent 79c2b78 commit 5b9b53c

File tree

1 file changed

+102
-54
lines changed

1 file changed

+102
-54
lines changed

index.bs

Lines changed: 102 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -157,57 +157,106 @@ This is often used to attempt to trick users into visiting scam websites.
157157
If this feature was proposed today, it would probably not proceed.
158158
</p>
159159

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.
161164

162165
In the context of fulfilling a user need,
163166
a web page may want to make use of a feature
164167
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>
189246

190247
In your specification, the [=request permission to use=] and [=prompt the user to choose=] algorithms from [[permissions]] are good ways to ask for consent.
191248

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+
192255
Refusal is most effective if the site cannot
193256
distinguish refusal from other, common situations.
194257
This can make it more difficult for a site to
195258
pressure users to grant consent.
196259

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-
211260
See also:
212261

213262
* [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).
239288
For such features, you should [understand the context](https://www.w3.org/TR/privacy-principles/#identity)
240289
in which it will be used,
241290
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).
243292
Design APIs to collect
244293
[the smallest amount of data](https://www.w3.org/TR/privacy-principles/#data-minimization)
245294
necessary.
@@ -363,7 +412,7 @@ APIs should also provide granularity and user controls,
363412
in particular over <a href="https://www.w3.org/TR/privacy-principles/#dfn-data">personal data</a>,
364413
that is communicated to sites.
365414
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.
367416

368417
<div class=example>
369418
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,
581630
then you should not support feature detection.
582631

583632
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.
586634
Generally, detecting whether the feature is implemented
587635
can be done separately from determining whether use of the feature has been authorized.
588636
In some cases, it might be necessary to disable feature detection
@@ -601,7 +649,7 @@ See also:
601649
* [[#do-not-expose-use-of-private-browsing-mode]]
602650
* [[#do-not-expose-use-of-assistive-tech]]
603651
* [[#secure-context]]
604-
* [[#consent]]
652+
* [[#user-decisions]]
605653

606654
<h3 id=text-formats>Design textual formats for humans</h3>
607655

@@ -765,8 +813,7 @@ a single user’s activity
765813
both in and out of private browsing mode,
766814
consider possible [mitigations](https://www.w3.org/TR/security-privacy-questionnaire/#mitigations)
767815
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.
770817

771818
Private browsing modes enable users to browse the web
772819
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
861908

862909
Note that while user activation is in many cases necessary,
863910
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.
866913

867914
<h3 id="support-non-fully-active">Support non-fully active BFCached documents</h3>
868915

@@ -2114,7 +2161,7 @@ Promise-using code also tends to be easier to understand
21142161
than code using callback functions.
21152162

21162163
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),
21182165
* some information might need to be read from disk,
21192166
or requested from the network,
21202167
* 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:
30623109
: Hide sensitive information behind a user permission
30633110
:: If you can't create a device identifier in an anonymous way,
30643111
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.
30683114
: Tie identifiers to the same-origin model
30693115
:: Create distinct identifiers for the same physical device
30703116
for each origin that has has access to it.
@@ -3085,7 +3131,7 @@ use these guidelines when exposing device information:
30853131

30863132
See also:
30873133

3088-
* [[#consent]]
3134+
* [[#user-decisions]]
30893135
* [[LEAST-POWER]]
30903136
* [[FINGERPRINTING-GUIDANCE]]
30913137
* [[UNSANCTIONED-TRACKING]]
@@ -3109,7 +3155,7 @@ you may not need to expose a list to script at all.
31093155
An API which invokes a User-Agent-provided device picker could suffice.
31103156
Such an API:
31113157
- 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,
31133159
- doesn't expose any fingerprinting data about the user's environment by default, and
31143160
- only exposes information about one device at a time.
31153161

@@ -3119,6 +3165,8 @@ the fact that there are devices are available to be picked.
31193165
This does expose one bit of fingerprinting data about the user's environment
31203166
to websites,
31213167
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).
31223170

31233171
<div class=example>
31243172
The {{RemotePlayback}} interface

0 commit comments

Comments
 (0)