Sub topic 6
Designing a compliant banner and preference centre
This chapter assumes you know the legal basis from the earlier chapters. You should know that PECR and the ePrivacy Directive require consent before marketing cookies are set. You should also know that the GDPR and UK GDPR define consent as freely given, specific, informed and unambiguous, given by a clear affirmative act. Here you will turn that standard into interface decisions.
What the interface has to achieve
A cookie banner is the first layer of a consent flow. The preference centre is the second layer, where the visitor sees each purpose and vendor in detail. Together they must let a visitor make a real choice, and you must be able to prove it afterwards.
Regulators judge the interface, not your intentions. The EDPB's Guidelines 05/2020 on consent, the ICO's cookie guidance and the CNIL's recommendations all examine the same things:
- what the visitor is told
- how the choices are presented
- what happens when the visitor ignores the banner
Layer 1: the banner
The banner has two jobs. It must give enough information for the choice to be informed, and it must offer an easy route to each outcome.
Information to show up front
For consent to be informed, the visitor must understand what they are agreeing to. At the first layer, state these points in plain language:
- the purposes, such as "show you adverts on other sites" instead of "enhance your experience"
- that third parties may set cookies, and a link to their names in the second layer
- how to reject, how to change choices later, and a link to the cookie policy
Vague wording is a common failure. "We use cookies to improve our services" does not describe a marketing pixel that builds profiles across sites.
Equal prominence for accepting and rejecting
Refusing must be as easy as accepting. In practice, if "Accept all" is a button on the first layer, "Reject all" should be one too. It should have the same size, colour weight, font and position. Several authorities have fined organisations for hiding refusal behind a "Manage settings" link or a second screen. The CNIL's 2021 decisions against Google and Facebook are the well-known examples.
| Design choice | Likely to pass | Likely to fail |
|---|---|---|
| Buttons | "Accept all", "Reject all" and "Choose" styled alike | Bright "Accept" button next to a grey text link for refusal |
| Checkboxes | Optional categories off by default | Pre-ticked marketing box (invalid under the CJEU's *Planet49* ruling) |
| Wording | "Reject all marketing cookies" | "Continue" as the only button, treated as agreement |
| Page behaviour | Site usable while the banner is open | Full-screen wall that blocks content with no refusal option |
| Colour and emphasis | Neutral treatment of both outcomes | Dark patterns such as a pulsing accept button |
Silence, scrolling and continued browsing are not consent
Consent needs a clear affirmative act. Scrolling, closing the banner, or carrying on browsing does not meet that standard. Treat anything other than a positive choice as refusal. Close the banner with no marketing tags loaded, and leave a visible way to reopen it.
A "legitimate interests" toggle for marketing cookies does not replace consent. The cookie rules require consent for storing or reading information on the device whatever the GDPR legal basis for later processing. Showing a legitimate-interests objection toggle beside marketing cookies confuses the visitor and invites criticism.
Layer 2: the preference centre
The preference centre handles specificity, meaning separate choices for separate purposes.
Granularity
Offer at least one toggle per purpose, for example analytics, personalisation and marketing. Do not bundle marketing with a purpose that the visitor might want. The EDPB says consent is not freely given if a person cannot consent to one purpose without consenting to others. Each purpose should have:
- a toggle that is off by default, except for strictly necessary cookies
- a short description in plain language
- the vendors or cookies involved, with duration and who receives the data
Strictly necessary cookies do not need consent, so list them as "always active" with no toggle. Be honest about the category. A cookie that serves advertising is not necessary just because it supports your revenue.
Making it work for everyone
Accessibility is part of "freely given" in practice. A banner that cannot be operated by keyboard or read by a screen reader excludes some visitors from making a choice. Check these points:
- every control is reachable and operable by keyboard
- toggles have text labels and state, not colour alone
- the dialog does not trap focus without a way out
- contrast and text size meet WCAG 2.2 AA
A sketch of the interface logic
The following JavaScript builds a banner with equal-weight buttons and optional categories off by default. It stops short of loading anything. In your site, the onSave callback would store the record and then enable tags, as covered in the chapters on enforcement and records.
const CATEGORIES = [
{ id: 'necessary', label: 'Strictly necessary (always on)', locked: true },
{ id: 'analytics', label: 'Analytics', locked: false },
{ id: 'marketing', label: 'Marketing and advertising', locked: false },
];
function buildBanner(onSave) {
const banner = document.createElement('div');
banner.setAttribute('role', 'dialog');
banner.setAttribute('aria-label', 'Cookie choices');
const text = document.createElement('p');
text.textContent =
'Marketing cookies let us and our advertising partners show you ' +
'adverts on other sites. Choose what you allow.';
banner.appendChild(text);
const boxes = {};
for (const cat of CATEGORIES) {
const label = document.createElement('label');
const box = document.createElement('input');
box.type = 'checkbox';
box.checked = cat.locked; // only necessary cookies start on
box.disabled = cat.locked;
boxes[cat.id] = box;
label.append(box, ' ' + cat.label);
banner.appendChild(label);
}
function finish(choices, method) {
banner.remove();
onSave({ ...choices, necessary: true }, method);
}
function makeButton(name, handler) {
const b = document.createElement('button');
b.type = 'button';
b.textContent = name;
b.addEventListener('click', handler);
return b;
}
// Same element type, same styling class, same row.
banner.append(
makeButton('Accept all', () =>
finish({ analytics: true, marketing: true }, 'banner_accept_all')),
makeButton('Reject all', () =>
finish({ analytics: false, marketing: false }, 'banner_reject_all')),
makeButton('Save my choices', () =>
finish(
{ analytics: boxes.analytics.checked, marketing: boxes.marketing.checked },
'banner_accept_selected'))
);
document.body.appendChild(banner);
}
// Call once the DOM is ready.
buildBanner((choices, method) => console.log(choices, method));Each button produces a method value. Keep these values, because the consent record in the next chapter uses them to show how the visitor chose.
The flow at a glance
Common design errors
Most enforcement findings fall into a short list. Check your design against these:
- Pre-ticked boxes or default-on toggles. Invalid under Planet49 (CJEU, C-673/17).
- Cookie walls for general content. Making access depend on accepting marketing cookies puts the "freely given" standard at risk. Authorities are especially sceptical where the visitor has no real alternative.
- Consent by inactivity. Treating a scroll or click on page content as agreement.
- Unequal refusal. Reject sits on a second layer, or looks like plain text.
- Misleading labels. Marketing cookies described as "performance" or "experience" cookies.
- Reprompting loops. Showing the banner again on every page after a refusal, to wear the visitor down. Re-prompting needs a sensible interval and a reason, such as a changed purpose or an expired record.
- Unreachable withdrawal. The visitor can accept in one click but needs many steps to undo it.
- Banner out of step with reality. The banner says "marketing off" while tags still fire. This is a technical fault, but regulators treat it as a misleading interface.
Design decisions with trade-offs
Some choices have no single right answer. Weigh them against your risk and your audience.
- Two layers or one. A single layer with all toggles is easy to defend but can overwhelm. Two layers work if both "Accept all" and "Reject all" appear on layer one.
- Vendor-level or purpose-level consent. Purpose-level toggles are simpler. Vendor-level lists are more transparent, and frameworks like IAB TCF use them, but they raise the information load. Choose the level your vendors and your legal advice can support.
- Wording per audience. Test language on real users. If most people cannot say what "marketing cookies" does, the consent is probably not informed.
- Language and region. Show the banner in the visitor's language. Serve it to all UK and EU visitors, or apply it globally if that is simpler than geo-targeting. A geo-targeted banner depends on accurate location detection, and mistakes there create gaps.
Review checklist
Before release, confirm each item:
- optional categories are off by default
- "Accept all" and "Reject all" appear together on the first layer with equal weight
- text states purposes and third-party involvement in plain language
- strictly necessary cookies are separated and honestly categorised
- ignoring or closing the banner counts as no consent
- a persistent link lets the visitor reopen the preference centre
- the banner works by keyboard and with a screen reader
- the banner version is logged with every choice
Exercise
A site's first-layer banner has a large green "Accept all" button and a small grey "Manage options" link. Marketing and analytics toggles inside the second layer are pre-ticked. Visitors who close the banner are treated as having accepted. Name three problems and how to fix each.
Show answer
First, refusal is not as easy as acceptance, because there is no "Reject all" on the first layer. Add a "Reject all" button with the same size, style and position as "Accept all". Second, the pre-ticked toggles are not a clear affirmative act, as in the Planet49 ruling. Set all optional categories to off by default. Third, closing the banner is not consent, because consent needs a positive act. Treat closing as refusal, load no marketing tags, and keep a link to reopen the preferences.
Exercise
Your marketing team wants the banner to say "We use cookies to improve your experience" and give only an "OK" button. Which consent conditions does this fail, and what would you offer instead?
Show answer
It fails "informed" because it does not describe the marketing purpose or third-party involvement. It fails "specific" and "freely given" because there is no separate choice per purpose and no way to refuse. "OK" is also not a clear choice about marketing. Offer a banner that names the purposes in plain language, shows equal "Accept all" and "Reject all" buttons, and links to a preference centre with an off-by-default toggle for each purpose.