Skip to content

v4.1.4 - Customizable Heading Level for Dialog & Opening by hash

Choose a tag to compare

@PavlosIsaris PavlosIsaris released this 06 Jun 06:58
· 18 commits to main since this release

v4.1.4 - Customizable Heading Level for Dialog & Opening by hash

  • Added the ability to customize the heading level of the cookie consent dialog title and the accordion headings via the heading and accordion-heading attribute on the <x-laravel-cookie-guard> component.

  • This allows developers to specify the semantic heading tag (e.g., h2, h3, etc.) for better accessibility and SEO integration with their application's heading structure.

  • Example usage:

    <x-laravel-cookie-guard heading="h2" accordion-heading="h5"/>
  • The default heading level is now h2 for heading and h5 for accordion-heading, if not specified.

  • The cookie consent banner can now also be opened by navigating to the #consent-settings hash in the URL. The banner will open automatically on page load or when the hash changes to #consent-settings.
    Example usage:

    <div>
      <a href="#consent-settings">Cookies Preferences</a>
    </div>