Skip to content

Commit 84bd433

Browse files
rhiarotorgo
andauthored
New principle: guidence on user activation, for #314 (#365)
* New principle: guidence on user activation, for #314 Co-authored-by: Daniel Appelquist <[email protected]>
1 parent 62419c4 commit 84bd433

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

index.bs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ If this feature was proposed today, it would probably not proceed.
182182
<h3 id="consent">Ask users for meaningful consent when appropriate</h3>
183183

184184
If a useful feature has the potential to cause harm to users,
185-
make sure that the user can give [*meaningful consent*](https://www.w3.org/2001/tag/doc/ethical-web-principles/#control) for that feature to be used,
185+
make sure that the user can give *[meaningful consent](https://www.w3.org/2001/tag/doc/ethical-web-principles/#control)* for that feature to be used,
186186
and that they can refuse consent effectively.
187187

188188
In order to give *meaningful consent*, the user must:
@@ -657,6 +657,30 @@ See also:
657657
* [Security and privacy are essential](https://www.w3.org/2001/tag/doc/ethical-web-principles/#privacy)
658658
* [What data does this specification expose to an origin?](https://www.w3.org/TR/security-privacy-questionnaire/#underlying-platform-data)
659659

660+
<h3 id="require-user-activation">Powerful APIs should require user activation</h3>
661+
662+
Some powerful APIs can produce intrusive UI (eg. auto-playing audio),
663+
expose user data (eg. interacting with the clipboard),
664+
perform a background activity without an obvious indicator to the user (eg. accessing local storage),
665+
or prompt the user to interact with [trusted UI](#trusted-ui)
666+
(eg. permission prompts, device hardware features).
667+
These APIs should be designed to require some indication of user intention (such as **user activation**) in order to function.
668+
This indicates that the user is intentionally interacting with the web page in question.
669+
670+
User activation is defined in detail
671+
[in the HTML standard](https://html.spec.whatwg.org/#tracking-user-activation).
672+
You should think about the effect your API has on the user experience,
673+
as well as any risks presented to the user,
674+
when deciding whether user activation needs to only occur
675+
once overall ([sticky](https://html.spec.whatwg.org/#sticky-activation-gated-api)),
676+
periodically ([transient](https://html.spec.whatwg.org/#transient-activation-gated-api)) or
677+
once per API call ([transient consuming](https://html.spec.whatwg.org/#activation-consuming-api)).
678+
679+
Note that while user activation is in many cases necessary,
680+
it is not always *sufficient*
681+
to protect users from invasive behaviours,
682+
and seeking [meaningful consent](#consent) is also important.
683+
660684
<h3 id="support-non-fully-active">Support non-"fully active" documents</h3>
661685

662686
After a user navigated away from a document,

0 commit comments

Comments
 (0)