Git Product home page Git Product logo

inthepocket / cookie-though Goto Github PK

View Code? Open in Web Editor NEW
103.0 7.0 8.0 6.07 MB

๐Ÿช Easy to use, minimal footprint cookie consent library. So delicious, you'll never need another library again ๐Ÿ˜„

Home Page: https://cookiethough.dev

License: MIT License

JavaScript 2.10% HTML 2.07% Shell 2.38% CSS 10.61% TypeScript 82.31% Ruby 0.53%
gdpr-consent gdpr-compliant cookie-consent

cookie-though's People

Contributors

dependabot[bot] avatar gboston avatar klukies avatar originaljef avatar pechisworks avatar robrechtme avatar thibmaek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookie-though's Issues

Discourage dark patterns

The default button in a cookie nagger should preferably be "Enable the strictly necessary" and not "Accept all".

The sample dialog has a darkish-pattern IMO. A user has to notice that "Customize" is a link. It needs to clicked first to see what the customizable options are. That makes for two extra clicks.

Incorrect aria-expanded attribute

Hi, I have a small accessibility improvement.

The element <div class="ct-collapse"> has an aria-expanded attribute. This attribute should be used on a control to indicate if its controlled elements are hidden or displayed.

So the <button class="ct-customization-button"> should have the aria-expanded attribute, and <div class="ct-collapse"> should have an aria-hidden attribute.

Google Lighthouse also indicates the current implementation is in violation with the specs.

Add extra CSS variables

Is it possible to add some more CSS variables such as:

  • Button (.ct-button) padding
  • Button border
  • Button border-radius
  • Container (.cookie-though) border-radius

Please ๐Ÿฑ

No touch events on mobile

No buttons seam to work on mobile. Both on Android Chrome or iPad Safari.

I've added remote debugging and I got this error when I click a button (or the arrow):

fastclick.js:9 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080
FastClick.onTouchStart @ fastclick.js:9
(anonymous) @ fastclick.js:9

The click event on the button is never triggered.

I'm using the latest version 1.1.3 from https://unpkg.com/[email protected]

All is working well on desktop.

Any thoughts?

Tnx!

Latest build is broken

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
    at fb (lib.js?:formatted:1141)
    at Object.eval [as __] (lib.js?:formatted:1176)
    at ra (lib.js?:formatted:627)
    at Array.forEach (<anonymous>)
    at eval (lib.js?:formatted:552)
    at Array.forEach (<anonymous>)
    at Gb (lib.js?:formatted:548)
    var fb = function() {
        var e = document.querySelector(".cookie-though")
          , $ = e.shadowRoot.querySelector(".ct-banner-explanation")
          , t = +window.getComputedStyle($).fontSize.slice(0, -2)
          , s = window.innerWidth < 768;

CCPA Compatibility ?

Hello,
Thanks for the module, it looks great, You do not mention though CCPA Compliance, only GDPR's compliance is that something that is taken into account ? Is it compatible with CCPA?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.