A cookie banner can look right while non-essential storage runs before users have made a choice. Most consent failures with cookie banners don't come from bad wording. They come from picking the wrong pattern for what the service actually stores. This teardown walks through the recurring failure, maps it to the requirements it breaches, and gives you checks to run before you copy anyone's banner.
No single organisation's incident is analysed here. The failure described is a pattern: a banner design is adopted, usually from a well-known public-sector example, without first establishing what the service sets and where. The GOV.UK guidance is a good reference because it spells out three distinct patterns and says plainly that its guidance is not legal advice.
What happened (brief factual summary)
A team needs a banner. It finds an example, copies the markup and button labels, and ships. The banner looks right. Underneath, one or more of these gaps exists:
- The service sets only essential cookies but shows a banner anyway, while the page that tells users about those cookies is missing.
- The service sets non-essential cookies on the server, but the banner depends on JavaScript, so some users never see a choice.
- The service uses HTML5 local storage or a service worker and never counted it, because the audit only listed items labelled "cookies".
- The banner is made sticky, and it covers keyboard-focused content.
None of this requires an attacker. It is a design-to-implementation gap that leaves non-essential storage running without a valid choice, or leaves users unable to operate the choice they're given.
Timeline
Because this is a pattern rather than a single event, the timeline is a typical sequence of decisions:
- Banner selected first. The team picks wording and buttons before auditing storage.
- Audit skipped or partial. Only cookies are listed. Local storage and service workers are missed, though the cookies page pattern says a cookies page should cover other technologies that store information on the user's device, giving HTML5 local storage and service workers as examples.
- Server/client split not recorded. Nobody notes whether each item is set on the server or the client. That one fact decides which banner pattern is viable.
- Banner built and styled. A sticky position is added for visibility.
- Preferences handled loosely. The choice isn't persisted, or no confirmation appears.
- Launch. The cookies page is missing, generic, or buried.
Which controls failed or were missing
No audit-first step. The cookies page pattern tells teams to audit cookies, categorise them as essential, functional, analytics or other, and identify whether each is set on the server or the client. Skipping this means the banner pattern is chosen blind.
Pattern mismatch. The three patterns are not interchangeable:
- Essential cookies only. No banner is needed, because strictly necessary cookies don't require consent. Users must still be told that essential cookies are set, via a cookies page linked from the footer.
- Non-essential cookies set on the server (with or without client-side ones). The banner sits inside a form so users can accept or reject. It works without JavaScript, so every user sees it. Progressive enhancement can stop the page reloading for users who do run JavaScript, with all possible messages in the HTML and hidden via the
hiddenattribute until needed. - Non-essential cookies set only on the client. A JavaScript-only banner is acceptable. Messages are hidden by default and revealed by script; the confirmation message gets
tabindex="-1"androle="alert", and focus moves to it.
Using the JavaScript-only pattern on a service that sets non-essential cookies server-side leaves non-JavaScript users with no way to choose.
Consent state errors. The banner must keep showing until the user accepts, rejects, or saves preferences on the Cookies page. It must not set non-essential cookies unless the user accepted them on a previous visit, and must not reappear once preferences are saved. After a choice, it should hide the message, show a confirmation with a hide button, and save preferences for 1 year.
Accessibility regression. The component guidance says not to make the banner sticky, because it could obscure focused content. That ties to WCAG 2.2 success criterion 2.4.11. The W3C's explanation of that criterion states that a notification implemented as sticky content, such as a cookie banner, fails if it entirely obscures a component receiving focus.
Thin transparency. The banner text should be short but accurate, name the service, and change if third parties set cookies or cookies serve purposes beyond analytics or remembering settings. Detail belongs on a service-specific Cookies page, not in terms and conditions.
What the relevant standard requires
GDPR consent under Article 4(11) must be freely given, specific, informed and unambiguous, and Article 7 requires the controller to be able to demonstrate it. Where information is stored on or read from a user's device, UK PECR rules apply alongside GDPR, and the GOV.UK guidance names both. Neither text prescribes a banner layout; the patterns above are one implementation, not a compliance template.
Two practical consequences follow. First, strictly necessary cookies need no consent, so the banner question turns on your audit, not on a blanket rule. Second, transparency obligations still apply to essential cookies, which is why the essential-only pattern keeps a cookies page.
Lessons and action items for your team
- Audit before design. List every cookie, local storage entry, service worker and similar technology. Record category, purpose, expiry, third-party setter if any, and whether it's set on the server or the client.
- Choose the pattern from the audit. Essential only: no banner, cookies page in the footer. Any server-set non-essential cookie: form-based banner. Client-only: JavaScript banner.
- Test with JavaScript disabled. If you're on the form-based pattern, every user must still see and submit a choice.
- Test consent state. Confirm no non-essential cookie is set before acceptance, none reappears after rejection, and the banner doesn't return once preferences are saved for the 1-year period.
- Tab through the page. Check that the banner is not fixed or sticky and nothing focused disappears behind it.
- Write for the service. Name it in the heading, update the text for third-party cookies, and link to a service-specific Cookies page listing each cookie by name, purpose and expiry.
- Own the update process. Agree who changes the cookies page and banner when a cookie is added or removed.
- Get privacy review. Have your organisation's privacy expert check the result against your actual obligations. A banner example is a starting point, not a legal conclusion.





