ampproject / ampproject/amphtml
amp-consent: discourage developers from leaving granular consent purposes in an unresolved state
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Here's my concern. Typically, when making granular consent choices, the user will see a form-like area with checkboxes, like this:
```html
Marketing cookies
Analytics
Save
Dismiss
```
Let's say the user checks one of the boxes, leaves the other blank, and taps "Save". They may well think that they've accepted one consent choice but denied the others. However, this is not really a ``. `siteConsent.setPurpose()` has only been called on one consent choice, leaving the rest of the consent choices unresolved.
If the developer understands the component better, they'll probably change this:
```html
```
to this:
```html
```
which will do what the user expects.
I wanted to propose that we make the `accept` action default to including `(purposeConsentDefault=false)`. The problem there is that this consent UI might involve multiple tabs of choices, and the site developer might want to leave some of those in an unresolved state unless the user interacts with them in some way. On the other hand, if a user discovers that they think they've denied a consent type, but their PII is still being collected, the site owner could be in trouble with regulators.
Thus, instead, I'm putting this out there and hoping someone else has a more clever solution 😎
/cc @micajuine-ho
Contributor guide
Assessment
This issue has not been assessed yet.