[Accessibilité] Ajout d'une information textuelle sur l'état courant des services.

Le RGAA Critère 3.1 prévoit : " Critère 3.1. Dans chaque page web, l’information ne doit pas être donnée uniquement par la couleur. Cette règle est-elle respectée ?"
https://www.numerique.gouv.fr/publications/rgaa-accessibilite/methode-rgaa/criteres/#topic3
Cette contrainte d'accessibilité n'est pas respectée par Tarte Au Citron car la seule information qui indique quel service est activé est la couleur du bouton.
Ce commit ajoute une mention, à côté du titre du service indiquant l'état courant du service en question.
Les traductions dans les différentes langues ont été faites avec Google Translate
This commit is contained in:
Luc MULLER 2021-04-22 10:29:11 +02:00
parent 3a073633e8
commit be57d2a63c
29 changed files with 82 additions and 12 deletions

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "е изключен.", "fallback": "е изключен.",
"allowed": "Позволен",
"disallowed": "Забранено",
"ads": { "ads": {
"title": "Рекламодатели", "title": "Рекламодатели",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "està deshabilitat.", "fallback": "està deshabilitat.",
"allowed": "Permès",
"disallowed": "Desautoritzat",
"ads": { "ads": {
"title": "Xarxa de publicitat", "title": "Xarxa de publicitat",

View File

@ -40,6 +40,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "已禁用。", "fallback": "已禁用。",
"allowed": "允许的",
"disallowed": "不允许的",
"ads": { "ads": {
"title": "广告组", "title": "广告组",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "je vypnutý.", "fallback": "je vypnutý.",
"allowed": "povoleno",
"disallowed": "nepovoleno",
"ads": { "ads": {
"title": "Reklamní síť", "title": "Reklamní síť",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "er deaktiveret.", "fallback": "er deaktiveret.",
"allowed": "tilladt",
"disallowed": "ikke tilladt",
"ads": { "ads": {
"title": "Annonceringsnetværk", "title": "Annonceringsnetværk",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "ist deaktiviert.", "fallback": "ist deaktiviert.",
"allowed": "erlaubt",
"disallowed": "nicht erlaubt",
"ads": { "ads": {
"title": "Werbenetzwerke", "title": "Werbenetzwerke",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "είναι απενεργοποιημένο.", "fallback": "είναι απενεργοποιημένο.",
"allowed": "επιτρέπεται",
"disallowed": "απαγορεύεται",
"ads": { "ads": {
"title": "Διαφημιστικό Δίκτυο", "title": "Διαφημιστικό Δίκτυο",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "is disabled.", "fallback": "is disabled.",
"allowed": "allowed",
"disallowed": "disallowed",
"ads": { "ads": {
"title": "Advertising network", "title": "Advertising network",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "está deshabilitado.", "fallback": "está deshabilitado.",
"allowed": "permitido",
"disallowed": "rechazado",
"ads": { "ads": {
"title": "Red de publicidad", "title": "Red de publicidad",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "hylätty.", "fallback": "hylätty.",
"allowed": "sallittu",
"disallowed": "kielletty",
"ads": { "ads": {
"title": "Mainosverkosto", "title": "Mainosverkosto",

View File

@ -44,6 +44,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "est désactivé.", "fallback": "est désactivé.",
"allowed": "autorisé",
"disallowed": "interdit",
"ads": { "ads": {
"title": "Régies publicitaires", "title": "Régies publicitaires",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "letiltott.", "fallback": "letiltott.",
"allowed": "megengedett",
"disallowed": "nem engedélyezett",
"ads": { "ads": {
"title": "Reklámhálózat", "title": "Reklámhálózat",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "è disattivato", "fallback": "è disattivato",
"allowed": "permesso",
"disallowed": "non consentito",
"ads": { "ads": {
"title": "Regie pubblicitarie", "title": "Regie pubblicitarie",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "is disabled.", "fallback": "is disabled.",
"allowed": "許可",
"disallowed": "許可されていません",
"ads": { "ads": {
"title": "Advertising network", "title": "Advertising network",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "letiltott.", "fallback": "letiltott.",
"allowed": "atļauts",
"disallowed": "nav atļauts",
"ads": { "ads": {
"title": "Reklámhálózat", "title": "Reklámhálózat",

View File

@ -32,6 +32,8 @@ tarteaucitron.lang = {
"credit": "Cookie manager mogelijk gemaakt door tarteaucitron.js", "credit": "Cookie manager mogelijk gemaakt door tarteaucitron.js",
"fallback": "is uitgeschakeld.", "fallback": "is uitgeschakeld.",
"allowed": "toegestaan",
"disallowed": "niet toegestaan",
"toggleInfoBox": "Toon/verberg informatie over cookie opslag", "toggleInfoBox": "Toon/verberg informatie over cookie opslag",
"title": "Cookies beheer paneel", "title": "Cookies beheer paneel",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback" : "er skrudd av.", "fallback" : "er skrudd av.",
"allowed": "tillatt",
"disallowed": "ikke tillatt",
"ads" : { "ads" : {
"title" : "Annonsenettverk", "title" : "Annonsenettverk",

View File

@ -44,6 +44,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "es desactivat.", "fallback": "es desactivat.",
"allowed": "allowed",
"disallowed": "disallowed",
"ads": { "ads": {
"title": "Regias publicitàrias", "title": "Regias publicitàrias",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "jest nieaktywna.", "fallback": "jest nieaktywna.",
"allowed": "dozwolony",
"disallowed": "niedozwolone",
"ads": { "ads": {
"title": "Sieć reklamowa", "title": "Sieć reklamowa",

View File

@ -41,6 +41,9 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "está desativado.", "fallback": "está desativado.",
"allowed": "permitido",
"disallowed": "não permitido",
"ads": { "ads": {
"title": "Rede de anúncios", "title": "Rede de anúncios",
"details": "As redes de anúncios podem gerar receitas com a venda de espaço publicitário no site." "details": "As redes de anúncios podem gerar receitas com a venda de espaço publicitário no site."

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "este dezactivat.", "fallback": "este dezactivat.",
"allowed": "permis",
"disallowed": "nepermis",
"ads": { "ads": {
"title": "Rețea de publicitate", "title": "Rețea de publicitate",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"fallback": "Деактивирован.", "fallback": "Деактивирован.",
"allowed": "разрешается",
"disallowed": "запрещено",
"ads": { "ads": {
"title": "Рекламная сеть", "title": "Рекламная сеть",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "är ur funktion.", "fallback": "är ur funktion.",
"allowed": "tillåten",
"disallowed": "tillåtet",
"ads": { "ads": {
"title": "Annonsnätverk", "title": "Annonsnätverk",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "je zakázané.", "fallback": "je zakázané.",
"allowed": "povolený",
"disallowed": "nepovolený",
"ads": { "ads": {
"title": "Reklamná sieť", "title": "Reklamná sieť",

View File

@ -42,6 +42,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "är ur funktion.", "fallback": "är ur funktion.",
"allowed": "dovoljeno",
"disallowed": "nedovoljeno",
"ads": { "ads": {
"title": "Annonsnätverk", "title": "Annonsnätverk",

View File

@ -44,6 +44,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "devre dışı.", "fallback": "devre dışı.",
"allowed": "izin verildi",
"disallowed": "izin verilmeyen",
"ads": { "ads": {
"title": "Reklam yönetimi", "title": "Reklam yönetimi",

View File

@ -43,6 +43,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "tắt.", "fallback": "tắt.",
"allowed": "được phép",
"disallowed": "không được phép",
"ads": { "ads": {
"title": "Mạng quảng cáo", "title": "Mạng quảng cáo",

View File

@ -40,6 +40,8 @@ tarteaucitron.lang = {
"icon": "Cookies", "icon": "Cookies",
"fallback": "已禁用。", "fallback": "已禁用。",
"allowed": "允许的",
"disallowed": "不允许的",
"ads": { "ads": {
"title": "广告组", "title": "广告组",

View File

@ -17,7 +17,7 @@ var scripts = document.getElementsByTagName('script'),
var tarteaucitron = { var tarteaucitron = {
"version": 20210310, "version": 20210422,
"cdn": cdn, "cdn": cdn,
"user": {}, "user": {},
"lang": {}, "lang": {},
@ -391,7 +391,7 @@ var tarteaucitron = {
} }
if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) { if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">'; html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
//html += '<div class="tarteaucitronAlertBigWrapper">'; //html += '<div class="tarteaucitronAlertBigWrapper">';
html += ' <span id="tarteaucitronDisclaimerAlert">'; html += ' <span id="tarteaucitronDisclaimerAlert">';
html += ' ' + tarteaucitron.lang.alertBigPrivacy; html += ' ' + tarteaucitron.lang.alertBigPrivacy;
@ -411,7 +411,7 @@ var tarteaucitron = {
//html += '</div>'; //html += '</div>';
html += '</div>'; html += '</div>';
} else { } else {
html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">'; html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
//html += '<div class="tarteaucitronAlertBigWrapper">'; //html += '<div class="tarteaucitronAlertBigWrapper">';
html += ' <span id="tarteaucitronDisclaimerAlert">'; html += ' <span id="tarteaucitronDisclaimerAlert">';
@ -595,11 +595,11 @@ var tarteaucitron = {
}, 1500); }, 1500);
} }
if(tarteaucitron.parameters.closePopup === true){ if(tarteaucitron.parameters.closePopup === true){
var closeElement = document.getElementById('tarteaucitronAlertBig'), let element = document.getElementById('tarteaucitronAlertBig');
closeSpan = document.createElement('span'); let span = document.createElement('span')
closeSpan.textContent = 'X'; span.textContent = 'X';
closeSpan.setAttribute('id', "tarteaucitronCloseCross"); span.setAttribute('id', "tarteaucitronCloseCross")
closeElement.insertBefore(closeSpan, closeElement.firstElementChild); element.insertBefore(span, element.firstElementChild)
} }
@ -745,14 +745,15 @@ var tarteaucitron = {
isDenied = (cookie.indexOf(service.key + '=false') >= 0), isDenied = (cookie.indexOf(service.key + '=false') >= 0),
isAllowed = ((cookie.indexOf(service.key + '=true') >= 0) || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)), isAllowed = ((cookie.indexOf(service.key + '=true') >= 0) || (!service.needConsent && cookie.indexOf(service.key + '=false') < 0)),
isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0), isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0),
isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1"); isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1"),
currentStatus = (isAllowed) ? tarteaucitron.lang.allowed : tarteaucitron.lang.disallowed;
if (tarteaucitron.added[service.key] !== true) { if (tarteaucitron.added[service.key] !== true) {
tarteaucitron.added[service.key] = true; tarteaucitron.added[service.key] = true;
html += '<li id="' + service.key + 'Line" class="tarteaucitronLine">'; html += '<li id="' + service.key + 'Line" class="tarteaucitronLine">';
html += ' <div class="tarteaucitronName">'; html += ' <div class="tarteaucitronName">';
html += ' <span class="tarteaucitronH3" role="heading" aria-level="3">' + service.name + '</span>'; html += ' <span class="tarteaucitronH3" role="heading" aria-level="3">' + service.name + ' (<span id="tacCurrentStatus' + service.key + '">'+currentStatus+'</span>)</span>';
html += ' <span id="tacCL' + service.key + '" class="tarteaucitronListCookies"></span><br/>'; html += ' <span id="tacCL' + service.key + '" class="tarteaucitronListCookies"></span><br/>';
if (tarteaucitron.parameters.moreInfoLink == true) { if (tarteaucitron.parameters.moreInfoLink == true) {
@ -955,6 +956,12 @@ var tarteaucitron = {
if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); } if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
tarteaucitron.sendEvent(key + '_loaded'); tarteaucitron.sendEvent(key + '_loaded');
} }
var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
if(status == true){
itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
}else{
itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
}
tarteaucitron.state[key] = status; tarteaucitron.state[key] = status;
tarteaucitron.cookie.create(key, status); tarteaucitron.cookie.create(key, status);
tarteaucitron.userInterface.color(key, status); tarteaucitron.userInterface.color(key, status);
@ -990,6 +997,12 @@ var tarteaucitron = {
if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); } if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
} }
} }
var itemStatusElem = document.getElementById('tacCurrentStatus'+key);
if(status == true){
itemStatusElem.innerHTML = tarteaucitron.lang.allowed;
}else{
itemStatusElem.innerHTML = tarteaucitron.lang.disallowed;
}
tarteaucitron.state[key] = status; tarteaucitron.state[key] = status;
tarteaucitron.cookie.create(key, status); tarteaucitron.cookie.create(key, status);
tarteaucitron.userInterface.color(key, status); tarteaucitron.userInterface.color(key, status);
@ -1234,8 +1247,8 @@ var tarteaucitron = {
} }
//end ie compatibility //end ie compatibility
if (document.getElementById('tarteaucitronAlertBig') !== null) { if (document.getElementById('tarteaucitronPersonalize2') !== null) {
document.getElementById('tarteaucitronAlertBig').focus(); document.getElementById('tarteaucitronPersonalize2').focus();
} }
window.dispatchEvent(tacOpenAlertEvent); window.dispatchEvent(tacOpenAlertEvent);