beyonk-group / gdpr-cookie-consent-banner

A GDPR compliant cookie consent banner implementation
MIT License
251 stars 42 forks source link

aria-label part of button label #42

Closed BigBuckBunny closed 1 year ago

BigBuckBunny commented 1 year ago

Hi,

I copied your code you can see improperly placed.

<button type="button" class="cookieConsent__Button" on:click={() => { settingsShown = true } }> {settingsLabel} aria-label={settingsLabel} <<<<<<<===================

Thanks

Pierre

FranckPiazza commented 1 year ago

Hi,

the same issue for me

Thanks

BigBuckBunny commented 1 year ago

@FranckPiazza while waiting for the fix I modified the source in my projects:

node_modules/@beyonk/gdpr-cookie-consent-banner/src/components/Banner.svelte

just move the line of code up above the on:click.

By the way, do your buttons show up properly on mobile?

Later

FranckPiazza commented 1 year ago

I can't update your file, I use a CI for deployement with npm i & run build with webpackjs.

The butfix do not works for me.

I have set the config name like this :

acceptLabel: 'Accepter',
rejectLabel: 'Refuser & continuer',
settingsLabel: 'Préferences',
closeLabel: 'Fermer',

No modification on the button the render source code :

<button type="button" class="cookieConsent__Button">Cookie settings aria-label=Cookie settings</button>

No issue with 9.0.4 version but still here in 9.1.0 version

antony commented 1 year ago

solved - I screwed this up by accident. I'll release a new version imminently.

antony commented 1 year ago

Solved in v9.1.1

thanks to @yassinrais