Problem/Motivation

Ensure the interface presented by the Klaro module is itself GDPR compliant.

Steps to reproduce

Configure the module to display the notice dialog (modal or non-modal).
The 'Decline' button is themed such that it leads users away from selecting it by giving more prominence to selecting the 'Customize' or 'Accept' buttons.
Klaro notice dialog

Configure the module to display the fuller consent dialog.
The 'Decline' button is themed such that it leads users to select the 'Accept selected' dialogue.
Klaro consent dialog

The GDRP legislation says:
Buttons should have equal prominence:

  • The “Accept” and “Decline” options must be presented with equal visibility and ease of action.
  • It’s not compliant if “Accept” is a big bright button and “Decline” is hidden in small text or a link.

No nudging (dark patterns):

  • Consent must be freely given, meaning users should not be pressured, misled, or tricked into clicking "Accept".

And I know the argument that 'every website does this'... they are not fully compliant.

Proposed resolution

Change the style of the 'Decline' button on both dialogs to match the other buttons.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dunx created an issue. See original summary.

anybody’s picture

Version: 3.0.7 » 3.x-dev
Priority: Normal » Major

I agree this is a major GDPR / legal issue that should be fixed. It can be circumvented by custom styling, but should be fixed OOTB.

jan kellermann’s picture

Version: 3.x-dev » 3.1.x-dev
Status: Active » Postponed (maintainer needs more info)

The module comes with its own CSS, and the “Override CSS” option is enabled by default, which overrides the various color settings from the original dialog.
Could you please check again to see if the problem still exists in the current versions?

anybody’s picture

Priority: Major » Normal

Thanks @jan kellermann - I'll check that and lowered the priority. Maybe it's worth adding a sentence that this is suggested in most cases and also helpful in terms like GDPR compliance?

I guess we maybe thought it's just additional files to be loaded on top.

Maybe it's even worth telling if it unloads klaro css and makes things more lightweight, if that's the case?

You're talking about Override Klaro css variables("light") right? Not Adjust the UI to Drupal themes

jan kellermann’s picture

No, `Adjust the UI to Drupal themes` does the magic. Klaro JS has different button colors by default. We are adding own CSS for Drupal and several themes and our CSS has no different button colors.

The help text for this option is

Use a Drupal-like appearance for Klaro! UI elements. This module provides customized CSS styles for Olivero, Claro and Gin.

Maybe we can add something like this:

The CSS provided by this module represents the buttons in uniform colors and thus ensures a better GDPR conformity. The CSS can also be used to quickly make adjustments for your own theme (see README in the Styling section).

dunx’s picture

That would be an improvement.

As this is part of a recipe and likely to be used by non-expert site builder via Drupal CMS, it needs to be compliant out of the box whether or not the CSS can be overridden by somebody with the skills to make those changes.

jan kellermann’s picture

@dunx Yes, that's already the case. This option was added for stable version 3.0.0 in January 2025 and is enabled by default. See #3495342

dunx’s picture

I haven't retested (and will next week) but I raised this issue after that date so at that point the default styling was not GDPR compliant.
Leave until next Monday and I will retest :)

dunx’s picture

Retesting local on Mac:

  1. mkdir D11</li>
      <li>cd D11</li>
      <li>ddev config --project-type=drupal11 --docroot=web --php-version=8.3</li>
      <li>ddev start</li>
      <li>ddev composer create drupal/recommended-project:^11</li>
      <li>ddev composer require drush/drush</li>
      <li>ddev launch
  2. Configured admin
  3. ddev composer require drupal/klaro</li>
      <li>ddev drush en klaro

Once I can get the cookie dialogue to appear, the buttons are now the same colour by default on both the modal and elsewhere.

Klaro dialogue screen

Klaro customize screen

This issue has now been addressed.

jan kellermann’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.