Which tag for a cookie banner title? strong
Your cookie banner title needs to be a heading for screen readers, without your theme restyling it. Why strong with a heading role does both.
By Timo Leser3 min read
Which HTML element should the title of a cookie banner use? It's a question our support team gets more often than you might think. It makes sense: when your website goes through an accessibility audit, the cookie banner is one of the first things the auditor, or a screen reader, meets on a fresh visit. And the answer turns out to be surprisingly specific.
Does the European Accessibility Act apply to your cookie banner?
The European Accessibility Act, Directive (EU) 2019/882, applies from 28 June 2025 to a set of products and services, including e-commerce services for consumers. Microenterprises that provide services are exempt. The directive does not mention cookie banners or tell you which element a title should use. But if your website is in scope, the banner is part of what visitors have to get through, so expect it to be checked along with the rest of the page.
Why does a screen reader need the banner title to be a heading?
Many screen reader users move through a page by jumping from heading to heading. WCAG success criterion 1.3.1 Info and Relationships asks that structure you can see, such as a title above a block of text, is also available to assistive technology. A banner title that only looks bold is skipped by that kind of navigation, and the visitor has to find the banner some other way.
Why not use an h2 or h3 for the banner title?
The banner runs inside your website, and your theme's CSS often styles elements like h2 and h3. Give the banner title one of those and your theme can change its size, color or spacing inside the banner. The result can look nothing like the banner you designed, and differ from page template to page template.
Is strong with a heading role a real heading?
For assistive technology, yes. The W3C technique ARIA12 describes role="heading" paired with aria-level as a sufficient way to meet 1.3.1. The same technique notes that native heading elements are preferred when possible, which is a fair point for content you control. A banner that has to look the same inside any theme is the case where the ARIA route earns its place.
That is how the Consent Studio banner works by default, and the theme problem above is the reason. Plenty of websites style every h2 on the page, and a strong element is much less affected by those rules, so the banner title keeps the look you set for it. To keep the structure, the banner adds an ARIA attribute that tells screen readers the title is a level 2 heading. Visitors using assistive technology get the heading, and your theme leaves the title alone.
Can you choose a different heading element in Consent Studio?
On the Professional plan, Advanced Accessibility lets you pick the element yourself under Web CMP > Behaviour > Accessibility. The Banner Heading Element setting offers Strong (ARIA heading) or Heading 1 to Heading 6, and the Overview Heading Element setting does the same for the title of the cookie overview. If an audit asks for native headings, you can switch, and then check how your theme styles that element inside the banner. Our recommendation stays strong.
The setting, with screenshots, is described in the help center: Accessibility: banner title element. What else the banner does for keyboard and screen reader users is listed in Our work on digital accessibility.
Also available in German, Dutch
Back to the blog
