The Cookiebar is an informative banner used to notify users about the use of cookies on a website, as required by privacy regulations (e.g., Garante Privacy). To implement it, place the HTML structure immediately after the opening <body> tag.
Key requirements:
- The element must retain the
cookiebar class, as it is linked to the JavaScript function that manages the banner's visibility. - The acceptance button must include the data attribute
data-bs-accept="cookiebar" to trigger the closing of the banner. - A link to a cookie preferences page should be provided for detailed user management.
<section class="cookiebar fade" aria-label="Gestione dei cookies">
<p>Questo sito utilizza cookie tecnici, analytics e di terze parti. <br />Proseguendo nella navigazione accetti l’utilizzo dei cookie.</p>
<div class="cookiebar-buttons">
<a href="#" class="cookiebar-btn">Preferenze<span class="visually-hidden">cookies</span></a>
<button data-bs-accept="cookiebar" class="cookiebar-btn cookiebar-confirm">Accetto<span class="visually-hidden"> i cookies</span></button>
</div>
</section>