From b79fbec9f7ef4fe357dabdf7212a77f25c93569a Mon Sep 17 00:00:00 2001 From: Lena Date: Tue, 14 Aug 2018 10:36:33 +0200 Subject: [PATCH 1/4] Accessibility fixes --- css/tarteaucitron.css | 28 ++++++++++- tarteaucitron.js | 108 ++++++++++++++++++++++-------------------- 2 files changed, 83 insertions(+), 53 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 3b0951d..84806e0 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -1,3 +1,13 @@ +.modal-open{ + overflow: hidden; + height: 100%; +} + + +a:focus, button:focus { + outline: 2px solid #cb3333; +} + /*** * Responsive layout for the control panel */ @@ -71,11 +81,14 @@ color: #fff; } -#tarteaucitron b { +#tarteaucitron strong { font-size: 22px; font-weight: 500; } +#tarteaucitron ul { + padding: 0; +} /*** * Root div added just before */ @@ -96,6 +109,18 @@ vertical-align: initial; } +#tarteaucitronRoot h1 { + font-size: 1.5em; + text-align: center; + color: #fff; +} + +#tarteaucitronRoot h2 { + display: inline-block; + margin-left: 5px; + color: #fff; +} + /*** * Control panel */ @@ -289,6 +314,7 @@ text-align: center; text-decoration: none; width: auto; + border: 0; } #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName .tarteaucitronListCookies { diff --git a/tarteaucitron.js b/tarteaucitron.js index a971d5d..a7b794c 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -55,7 +55,7 @@ var tarteaucitron = { if (scrollPos > (screen.height * 2)) { tarteaucitron.userInterface.respondAll(true); } else if (scrollPos > (screen.height / 2)) { - document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '' + tarteaucitron.lang.alertBigScroll + ' ' + tarteaucitron.lang.alertBig; + document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '' + tarteaucitron.lang.alertBigScroll + ' ' + tarteaucitron.lang.alertBig; } if (tarteaucitron.orientation === 'top') { @@ -110,7 +110,7 @@ var tarteaucitron = { if (scrollPos > (screen.height * 2)) { tarteaucitron.userInterface.respondAll(true); } else if (scrollPos > (screen.height / 2)) { - document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '' + tarteaucitron.lang.alertBigScroll + ' ' + tarteaucitron.lang.alertBig; + document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '' + tarteaucitron.lang.alertBigScroll + ' ' + tarteaucitron.lang.alertBig; } if (tarteaucitron.orientation === 'top') { document.getElementById('tarteaucitronPercentage').style.top = heightPosition; @@ -236,46 +236,45 @@ var tarteaucitron = { // Step 3: prepare the html html += '
'; - html += '
'; - html += '
'; - html += '
'; + html += ''; + html += ''; + html += ' '; html += '
'; - html += '
'; + html += '

'+ tarteaucitron.lang.title + '

'; html += '
'; - html += ' ' + tarteaucitron.lang.all + ''; + html += '

' + tarteaucitron.lang.all + '

'; html += '
'; html += '
'; - html += '
'; - html += ' ✓ ' + tarteaucitron.lang.allow; - html += '
'; - html += '
'; - html += ' ✗ ' + tarteaucitron.lang.deny; - html += '
'; + html += ' '; + html += ' '; html += '
'; html += '
'; html += '
'; html += ' ' + tarteaucitron.lang.disclaimer; if (defaults.removeCredit === false) { html += '

'; - html += ' ' + tarteaucitron.lang.credit + ''; + html += ' ' + tarteaucitron.lang.credit + ''; } html += '
'; html += '
'; - html += '
'; + html += '
    '; for (i = 0; i < cat.length; i += 1) { - html += '
    '; + html += '
  • '; html += '
    '; - html += ' ' + tarteaucitron.lang[cat[i]].title; + html += ' '; html += '
    '; html += '
    '; html += ' ' + tarteaucitron.lang[cat[i]].details; html += '
    '; - html += '
  • '; - html += '
    '; + html += '
      '; } - html += '
      '; + html += '
    '; html += '
    '; html += '
    '; html += '
    '; @@ -289,43 +288,43 @@ var tarteaucitron = { html += ' '; html += ' ' + tarteaucitron.lang.alertBigPrivacy; html += ' '; - html += ' '; + html += ' '; html += '
    '; } else { html += '
    '; html += ' '; html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig; html += ' '; - html += ' '; + html += ' '; + html += ' '; html += '
    '; html += '
    '; } if (defaults.showAlertSmall === true) { html += '
    '; - html += '
    '; + html += '
    0
    '; + html += ' '; html += '
    '; - html += '
    '; + html += '
    '; + html += ' '; html += '
    '; - html += ' 0 cookie'; + html += ' 0 cookie'; html += '
    '; html += '
    '; html += '
    '; @@ -388,11 +387,11 @@ var tarteaucitron = { html = '
    '; html += ' '; html += ' ' + tarteaucitron.lang.adblock + '
    '; - html += ' ' + tarteaucitron.lang.adblock_call + ''; + html += ' ' + tarteaucitron.lang.adblock_call + ''; html += '
    '; - html += ' '; + html += ' '; html += '
    '; html += '
    '; div.id = 'tarteaucitronRoot'; @@ -426,27 +425,27 @@ var tarteaucitron = { if (tarteaucitron.added[service.key] !== true) { tarteaucitron.added[service.key] = true; - html += '
    '; + html += '
  • '; html += '
    '; - html += ' ' + service.name + '
    '; + html += '

    ' + service.name + '


    '; html += '
    '; - html += ' '; + html += ' '; html += ' ' + tarteaucitron.lang.more; html += ' '; html += ' - '; - html += ' '; + html += ' '; html += ' ' + tarteaucitron.lang.source; html += ' '; html += '
    '; html += '
    '; - html += '
    '; + html += '
    '; - html += '
    '; + html += ' '; + html += '
    '; + html += ' '; html += '
    '; - html += '
  • '; + html += ''; tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block'); @@ -653,6 +652,8 @@ var tarteaucitron = { tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); + document.getElementById('tarteaucitronClosePanel').focus(); + document.getElementsByTagName('body')[0].classList.add('modal-open'); tarteaucitron.userInterface.jsSizing('main'); }, "closePanel": function () { @@ -673,6 +674,9 @@ var tarteaucitron = { } else { tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none'); } + document.getElementById('tarteaucitronCloseAlert').focus(); + document.getElementsByTagName('body')[0].classList.remove('modal-open'); + }, "openAlert": function () { "use strict"; @@ -1036,14 +1040,14 @@ var tarteaucitron = { html += '
    '; } html += '
    '; - html += '
    × ' + name + ''; + html += '
    ' + name + ''; html += '
    '; html += '
    ' + cookies[i].split('=').slice(1).join('=') + '
    '; html += '
    '; } } else { html += '
    '; - html += '
    -
    '; + html += '
    -
    '; html += '
    '; html += '
    '; } @@ -1243,10 +1247,10 @@ var tarteaucitron = { html += '
    '; html += '
    '; - html += ' ' + tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback; - html += '
    '; + html += ' ' + tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback; + html += '
    '; + html += ' '; html += '
    '; html += '
    '; From 49c6cc77cd6e6ed3a115287bd51c3e61fb0eebd4 Mon Sep 17 00:00:00 2001 From: Lena Date: Tue, 14 Aug 2018 13:42:49 +0200 Subject: [PATCH 2/4] add a wrapper with aria-hidden when dialog is open + update CSS --- css/tarteaucitron.css | 44 ++++++++++++++++++++++++++-------- tarteaucitron.js | 56 +++++++++++++++++++++++++++++++++---------- 2 files changed, 78 insertions(+), 22 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 84806e0..9ae70c8 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -3,7 +3,6 @@ height: 100%; } - a:focus, button:focus { outline: 2px solid #cb3333; } @@ -47,6 +46,18 @@ a:focus, button:focus { #tarteaucitron #tarteaucitronServices .tarteaucitronTitle { text-align: left !important; } + + .tarteaucitronName h2 { + max-width: 80%; + } + + #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk { + text-align: center !important; + } + + #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk button { + margin-bottom: 5px; + } } @media screen and (min-width:768px) and (max-width:991px) { @@ -77,6 +88,12 @@ a:focus, button:focus { text-decoration: none; } +#tarteaucitronRoot button { + background: transparent; + border: 0; +} + +#tarteaucitronAlertBig strong, #tarteaucitronAlertSmall strong, #tarteaucitronAlertBig a, #tarteaucitronAlertSmall a { color: #fff; } @@ -89,6 +106,12 @@ a:focus, button:focus { #tarteaucitron ul { padding: 0; } + +.cookie-list { + list-style: none; + padding: 0; + margin: 0; +} /*** * Root div added just before */ @@ -188,8 +211,8 @@ a:focus, button:focus { position: relative; } -#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronTitle, -#tarteaucitron #tarteaucitronServices .tarteaucitronTitle, +#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronTitle button, +#tarteaucitron #tarteaucitronServices .tarteaucitronTitle button, #tarteaucitron #tarteaucitronInfo, #tarteaucitron #tarteaucitronServices .tarteaucitronDetails { background: #333; @@ -224,6 +247,7 @@ a:focus, button:focus { #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronTitle { padding: 5px 10px; + margin: 0; } #tarteaucitron #tarteaucitronInfo, @@ -275,7 +299,7 @@ a:focus, button:focus { margin-top: 2px; } -#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronName b { +#tarteaucitron #tarteaucitronServices .tarteaucitronMainLine .tarteaucitronName button { color: #fff; } @@ -348,12 +372,12 @@ a:focus, button:focus { } #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert, -#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert b { +#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert strong { font: 15px verdana; color: #fff; } -#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert b { +#tarteaucitronAlertBig #tarteaucitronDisclaimerAlert strong { font-weight: 700; } @@ -487,7 +511,7 @@ a:focus, button:focus { text-align: left; } -#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList b { +#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList strong { color: #333; } @@ -498,7 +522,7 @@ a:focus, button:focus { text-align: left; } -#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesTitle b { +#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesTitle strong { color: #fff; font-size: 16px; } @@ -523,7 +547,7 @@ a:focus, button:focus { width: 50%; } -#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain .tarteaucitronCookiesListLeft a b { +#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain .tarteaucitronCookiesListLeft a strong { color: darkred; } @@ -557,7 +581,7 @@ a:focus, button:focus { vertical-align: middle; } -.tac_activate .tac_float b { +.tac_activate .tac_float strong { color: #fff; } diff --git a/tarteaucitron.js b/tarteaucitron.js index a7b794c..1b6fb6d 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -324,7 +324,7 @@ var tarteaucitron = { html += ' ' + tarteaucitron.lang.close; html += ' '; html += '
    '; - html += ' 0 cookie'; + html += '

    0 cookie

    '; html += '
    '; html += '
    '; html += '
    '; @@ -336,10 +336,27 @@ var tarteaucitron = { tarteaucitron.addScript(tarteaucitron.cdn + 'advertising.js?v=' + tarteaucitron.version, '', function () { if (tarteaucitronNoAdBlocker === true || defaults.adblocker === false) { + + // create wrapper container + var wrapper = document.createElement('div'); + wrapper.id = "contentWrapper"; + + while (document.body.firstChild) + { + wrapper.appendChild(document.body.firstChild); + } + + // Append the wrapper to the body + document.body.appendChild(wrapper); + div.id = 'tarteaucitronRoot'; body.appendChild(div, body); div.innerHTML = html; + + // move el into wrapper + //wrapper.appendChild(el); + if (tarteaucitron.job !== undefined) { tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job); for (index = 0; index < tarteaucitron.job.length; index += 1) { @@ -384,16 +401,28 @@ var tarteaucitron = { if (defaults.adblocker === true) { setTimeout(function () { if (tarteaucitronNoAdBlocker === false) { - html = '
    '; - html += ' '; + html = ''; html += '
    '; + + // create wrapper container + var wrapper = document.createElement('div'); + wrapper.id = "contentWrapper"; + + while (document.body.firstChild) + { + wrapper.appendChild(document.body.firstChild); + } + + // Append the wrapper to the body + document.body.appendChild(wrapper); div.id = 'tarteaucitronRoot'; body.appendChild(div, body); div.innerHTML = html; @@ -653,6 +682,7 @@ var tarteaucitron = { tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); document.getElementById('tarteaucitronClosePanel').focus(); + document.getElementById('contentWrapper').setAttribute("aria-hidden", "true"); document.getElementsByTagName('body')[0].classList.add('modal-open'); tarteaucitron.userInterface.jsSizing('main'); }, @@ -675,6 +705,7 @@ var tarteaucitron = { tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none'); } document.getElementById('tarteaucitronCloseAlert').focus(); + document.getElementById('contentWrapper').setAttribute("aria-hidden", "false"); document.getElementsByTagName('body')[0].classList.remove('modal-open'); }, @@ -1027,24 +1058,25 @@ var tarteaucitron = { if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) { savedname = tarteaucitron.cookie.owner[name].join(' // '); html += '
    '; - html += '
    '; + html += '

    '; html += ' ' + tarteaucitron.cookie.owner[name].join(' // '); - html += '

    '; - html += '
    '; + html += ' '; + html += '
    '; } else { html += '
    '; html += '
    -
    '; From 412206eea53b4e1033755c65ec4e326fd27be023 Mon Sep 17 00:00:00 2001 From: Lena Date: Tue, 14 Aug 2018 15:45:48 +0200 Subject: [PATCH 3/4] add focusTrap method --- tarteaucitron.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index 1b6fb6d..d6db161 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -67,6 +67,7 @@ var tarteaucitron = { } } }, false); + window.addEventListener("keydown", function (evt) { if (evt.keyCode === 27) { tarteaucitron.userInterface.closePanel(); @@ -125,6 +126,21 @@ var tarteaucitron = { if (evt.keyCode === 27) { tarteaucitron.userInterface.closePanel(); } + + if ( evt.keyCode === 9 && focusableEls.indexOf(evt.target) >= 0) { + if ( evt.shiftKey ) /* shift + tab */ { + if (document.activeElement === firstFocusableEl) { + lastFocusableEl.focus(); + evt.preventDefault(); + } + } else /* tab */ { + if (document.activeElement === lastFocusableEl) { + firstFocusableEl.focus(); + evt.preventDefault(); + } + } + } + }); window.attachEvent("onhashchange", function () { if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') { @@ -678,12 +694,15 @@ var tarteaucitron = { }, "openPanel": function () { "use strict"; + tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); + document.getElementById('tarteaucitronClosePanel').focus(); document.getElementById('contentWrapper').setAttribute("aria-hidden", "true"); document.getElementsByTagName('body')[0].classList.add('modal-open'); + tarteaucitron.userInterface.focusTrap(); tarteaucitron.userInterface.jsSizing('main'); }, "closePanel": function () { @@ -709,6 +728,46 @@ var tarteaucitron = { document.getElementsByTagName('body')[0].classList.remove('modal-open'); }, + "focusTrap": function() { + "use strict"; + + var focusableEls, + firstFocusableEl, + lastFocusableEl, + filtered; + + focusableEls = document.getElementById('tarteaucitron').querySelectorAll('a[href], button'); + filtered = []; + + // get only visible items + for (var i = 0, max = focusableEls.length; i < max; i++) { + if (focusableEls[i].offsetHeight > 0) { + filtered.push(focusableEls[i]); + } + } + + firstFocusableEl = filtered[0]; + lastFocusableEl = filtered[filtered.length - 1]; + + //loop focus inside tarteaucitron + document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) { + + if ( evt.key === 'Tab' || evt.keyCode === 9 ) { + + if ( evt.shiftKey ) /* shift + tab */ { + if (document.activeElement === firstFocusableEl) { + lastFocusableEl.focus(); + evt.preventDefault(); + } + } else /* tab */ { + if (document.activeElement === lastFocusableEl) { + firstFocusableEl.focus(); + evt.preventDefault(); + } + } + } + }) + }, "openAlert": function () { "use strict"; var c = 'tarteaucitron'; From f64fecd67b2b2b6cb31ef57de0a246b5b86d622f Mon Sep 17 00:00:00 2001 From: Lena Date: Tue, 14 Aug 2018 15:55:49 +0200 Subject: [PATCH 4/4] better comments + add translations --- lang/tarteaucitron.cs.js | 8 ++++++++ lang/tarteaucitron.de.js | 8 ++++++++ lang/tarteaucitron.en.js | 8 ++++++++ lang/tarteaucitron.es.js | 18 +++++++++++++----- lang/tarteaucitron.fr.js | 8 ++++++++ lang/tarteaucitron.it.js | 8 ++++++++ lang/tarteaucitron.nl.js | 8 ++++++++ lang/tarteaucitron.pl.js | 8 ++++++++ lang/tarteaucitron.pt.js | 9 +++++++++ lang/tarteaucitron.ru.js | 8 ++++++++ tarteaucitron.js | 6 +----- 11 files changed, 87 insertions(+), 10 deletions(-) diff --git a/lang/tarteaucitron.cs.js b/lang/tarteaucitron.cs.js index 057d71f..915d950 100644 --- a/lang/tarteaucitron.cs.js +++ b/lang/tarteaucitron.cs.js @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "Dozvědět se více", "source": "Zobrazit oficiální stránku", "credit": "Správce cookies od tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", "fallback": "je vypnutý.", diff --git a/lang/tarteaucitron.de.js b/lang/tarteaucitron.de.js index 23cdc5f..939149d 100644 --- a/lang/tarteaucitron.de.js +++ b/lang/tarteaucitron.de.js @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "Weiter lesen", "source": "Zur offiziellen Webseite", "credit": "Cookies manager von tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", "fallback": "ist deaktiviert.", diff --git a/lang/tarteaucitron.en.js b/lang/tarteaucitron.en.js index 90c8ebb..8441457 100644 --- a/lang/tarteaucitron.en.js +++ b/lang/tarteaucitron.en.js @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "Read more", "source": "View the official website", "credit": "Cookies manager by tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", "fallback": "is disabled.", diff --git a/lang/tarteaucitron.es.js b/lang/tarteaucitron.es.js index b7df69f..986ef67 100644 --- a/lang/tarteaucitron.es.js +++ b/lang/tarteaucitron.es.js @@ -1,12 +1,12 @@ /*global tarteaucitron */ tarteaucitron.lang = { "adblock": "Hola! Este sitio web es transparente y le da la opción de activar los servicios de terceros.", - "adblock_call": "Por favor deshabilite su AdBlocker para personalizar los servicios.", + "adblock_call": "Por favor deshabilite su AdBlocker para empezar a personalizar los servicios.", "reload": "Actualizar esta página", "alertBigScroll": "Al continuar para desplazarse,", "alertBigClick": "Si continuas navegando por este sitio web,", - "alertBig": "estas permitiendo servicios de terceros", + "alertBig": "estar permitiendo servicios terceros", "alertBigPrivacy": "Este sitio web usa cookies y te permite controlar lo que deseas activar", "alertSmall": "Gestionar servicios", @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "Leer más", "source": "Ver sitio web oficial", "credit": "Gestor de cookies realizada por tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", "fallback": "está deshabilitado.", @@ -35,12 +43,12 @@ tarteaucitron.lang = { "details": "Las redes publicitarias pueden generar ingresos mediante la venta de espacios publicitarios en el sitio." }, "analytic": { - "title": "Medición de audiencia", + "title": "Mediciión de audiencia", "details": "Los servicios de medición de audiencia se usan para generar asistencia estadísticas útiles para mejorar el sitio." }, "social": { "title": "Redes sociales", - "details": "Las redes sociales pueden aumentar la usabilidad del sitio web y ayudar a promoverlo cuando se comparte." + "details": "Las redes sociales pueden aumentar la usabilidad del sitio web y ayudar a promoverlo a través de la contribución." }, "video": { "title": "Videos", @@ -56,7 +64,7 @@ tarteaucitron.lang = { }, "api": { "title": "APIs", - "details": "Los APIs se utilizan para cargar scripts: geolocalización, motor de búsqueda, traducciones, ..." + "details": "APIs se utilizan para cargar scripts: geolocalización, motor de búsqueda, traducciones, ..." }, "other": { "title": "Otro", diff --git a/lang/tarteaucitron.fr.js b/lang/tarteaucitron.fr.js index 6512403..09fd7e1 100644 --- a/lang/tarteaucitron.fr.js +++ b/lang/tarteaucitron.fr.js @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "En savoir plus", "source": "Voir le site officiel", "credit": "Gestion des cookies par tarteaucitron.js", + + "toggleInfoBox": "Afficher/masquer les informations sur le stockage des cookies", + "title": "Panneau de gestion des cookies", + "cookieDetail": "Détail des cookies", + "ourSite": "sur notre site", + "newWindow": "(nouvelle fenêtre)", + "allowAll": "Autoriser tous les cookies", + "denyAll": "Interdire tous les cookies", "fallback": "est désactivé.", diff --git a/lang/tarteaucitron.it.js b/lang/tarteaucitron.it.js index 8b2faf1..89f8393 100644 --- a/lang/tarteaucitron.it.js +++ b/lang/tarteaucitron.it.js @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "Saperne di più", "source": "Vai al sito ufficiale", "credit": "Gestione dei cookies da tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", "fallback": "è disattivato", diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js index dda9e78..2b7a1a5 100644 --- a/lang/tarteaucitron.nl.js +++ b/lang/tarteaucitron.nl.js @@ -30,6 +30,14 @@ tarteaucitron.lang = { "fallback": "is uitgeschakeld.", + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", + "ads": { "title": "Advertentienetwerk", "details": "Advertentienetwerken kunnen inkomsten genereren door advertentieruimte op de site te verkopen." diff --git a/lang/tarteaucitron.pl.js b/lang/tarteaucitron.pl.js index 6fe5b8e..fdbcc95 100644 --- a/lang/tarteaucitron.pl.js +++ b/lang/tarteaucitron.pl.js @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "Więcej informacji", "source": "Zobacz oficjalną stronę internetowa", "credit": "Cookies menadżer z tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", "fallback": "jest nieaktywna.", diff --git a/lang/tarteaucitron.pt.js b/lang/tarteaucitron.pt.js index 690fd20..303893b 100644 --- a/lang/tarteaucitron.pt.js +++ b/lang/tarteaucitron.pt.js @@ -25,6 +25,15 @@ tarteaucitron.lang = { "more": "Ler mais", "source": "Ver o site oficial", "credit": "Gerenciador de cookies por tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", + "fallback": "está desativado.", "ads": { "title": "Rede de anúncios", diff --git a/lang/tarteaucitron.ru.js b/lang/tarteaucitron.ru.js index d99370c..995c8c8 100644 --- a/lang/tarteaucitron.ru.js +++ b/lang/tarteaucitron.ru.js @@ -27,6 +27,14 @@ tarteaucitron.lang = { "more": "Подробнее", "source": "Посетите официальный сайт", "credit": "Кукис манаджер tarteaucitron.js", + + "toggleInfoBox": "Show/hide informations about cookie storage", + "title": "Cookies management panel", + "cookieDetail": "Cookie detail for", + "ourSite": "on our site", + "newWindow": "(new window)", + "allowAll": "Allow all cookies", + "denyAll": "Deny all cookies", "fallback": "Деактивирован.", diff --git a/tarteaucitron.js b/tarteaucitron.js index d6db161..c6a9a11 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -353,7 +353,7 @@ var tarteaucitron = { tarteaucitron.addScript(tarteaucitron.cdn + 'advertising.js?v=' + tarteaucitron.version, '', function () { if (tarteaucitronNoAdBlocker === true || defaults.adblocker === false) { - // create wrapper container + // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened var wrapper = document.createElement('div'); wrapper.id = "contentWrapper"; @@ -369,10 +369,6 @@ var tarteaucitron = { body.appendChild(div, body); div.innerHTML = html; - - // move el into wrapper - //wrapper.appendChild(el); - if (tarteaucitron.job !== undefined) { tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job); for (index = 0; index < tarteaucitron.job.length; index += 1) {