Remove h* use for SEO

This commit is contained in:
Adrien ERAUD 2018-09-27 16:13:59 +02:00
parent 6db6a87c9c
commit 4fe43eb84e
No known key found for this signature in database
GPG Key ID: BFE85C5F22D8EB9E
2 changed files with 33 additions and 29 deletions

View File

@ -56,11 +56,11 @@ div#tarteaucitronServices {
#tarteaucitronServices::-webkit-scrollbar { #tarteaucitronServices::-webkit-scrollbar {
width: 5px; width: 5px;
} }
#tarteaucitronServices::-webkit-scrollbar-track { #tarteaucitronServices::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 0 rgba(0,0,0,0); -webkit-box-shadow: inset 0 0 0 rgba(0,0,0,0);
} }
#tarteaucitronServices::-webkit-scrollbar-thumb { #tarteaucitronServices::-webkit-scrollbar-thumb {
background-color: #ddd; background-color: #ddd;
outline: 0px solid slategrey; outline: 0px solid slategrey;
@ -97,20 +97,20 @@ div#tarteaucitronServices {
top: 0 !important; top: 0 !important;
width: 100% !important; width: 100% !important;
} }
#tarteaucitron .tarteaucitronBorder { #tarteaucitron .tarteaucitronBorder {
border: 0 !important; border: 0 !important;
} }
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList { #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList {
border: 0 !important; border: 0 !important;
} }
#tarteaucitron #tarteaucitronServices .tarteaucitronTitle { #tarteaucitron #tarteaucitronServices .tarteaucitronTitle {
text-align: left !important; text-align: left !important;
} }
.tarteaucitronName h2 { .tarteaucitronName .tarteaucitronH2 {
max-width: 80%; max-width: 80%;
} }
@ -180,6 +180,10 @@ div#tarteaucitronServices {
padding: 0; padding: 0;
} }
#tarteaucitron .tarteaucitronH1, #tarteaucitron .tarteaucitronH2, #tarteaucitron .tarteaucitronH3, #tarteaucitron .tarteaucitronH4, #tarteaucitron .tarteaucitronH5, #tarteaucitron .tarteaucitronH6 {
display: block;
}
.cookie-list { .cookie-list {
list-style: none; list-style: none;
padding: 0; padding: 0;
@ -205,20 +209,20 @@ div#tarteaucitronServices {
vertical-align: initial; vertical-align: initial;
} }
#tarteaucitronRoot h1 { #tarteaucitronRoot .tarteaucitronH1 {
font-size: 1.5em; font-size: 1.5em;
text-align: center; text-align: center;
color: #fff; color: #fff;
margin: 15px 0 28px; margin: 15px 0 28px;
} }
#tarteaucitronRoot h2 { #tarteaucitronRoot .tarteaucitronH2 {
display: inline-block; display: inline-block;
margin: 12px 0 0 10px; margin: 12px 0 0 10px;
color: #fff; color: #fff;
} }
h2#tarteaucitronCookiesNumberBis { #tarteaucitronCookiesNumberBis.tarteaucitronH2 {
margin-left: 0; margin-left: 0;
} }
@ -293,7 +297,7 @@ h2#tarteaucitronCookiesNumberBis {
position: relative; position: relative;
} }
#tarteaucitronCookiesList h3.tarteaucitronTitle { #tarteaucitronCookiesList .tarteaucitronH3.tarteaucitronTitle {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
@ -432,7 +436,7 @@ h2#tarteaucitronCookiesNumberBis {
font-size: 12px; font-size: 12px;
} }
#tarteaucitron h3 { #tarteaucitron .tarteaucitronH3 {
font-size: 18px; font-size: 18px;
} }
@ -738,7 +742,7 @@ a.tarteaucitronSelfLink {
display: block; display: block;
text-shadow: 0 0 14px white; text-shadow: 0 0 14px white;
text-transform: uppercase; text-transform: uppercase;
}.tarteaucitronMainLine h2 { }.tarteaucitronMainLine .tarteaucitronH2 {
font-size: 1.2em!important; font-size: 1.2em!important;
margin-top: 4px!important; margin-top: 4px!important;
} }

View File

@ -275,7 +275,7 @@ var tarteaucitron = {
html += ' </button>'; html += ' </button>';
html += ' <div id="tarteaucitronServices">'; html += ' <div id="tarteaucitronServices">';
html += ' <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">'; html += ' <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">';
html += ' <h1 id="dialogTitle">'+ tarteaucitron.lang.title + '</h1>'; html += ' <span id="dialogTitle" class="tarteaucitronH1">'+ tarteaucitron.lang.title + '</span>';
html += ' <div id="tarteaucitronInfo" class="tarteaucitronInfoBox">'; html += ' <div id="tarteaucitronInfo" class="tarteaucitronInfoBox">';
html += ' ' + tarteaucitron.lang.disclaimer; html += ' ' + tarteaucitron.lang.disclaimer;
if (tarteaucitron.parameters.privacyUrl !== "") { if (tarteaucitron.parameters.privacyUrl !== "") {
@ -286,7 +286,7 @@ var tarteaucitron = {
} }
html += ' </div>'; html += ' </div>';
html += ' <div class="tarteaucitronName">'; html += ' <div class="tarteaucitronName">';
html += ' <h2>' + tarteaucitron.lang.all + '</h2>'; html += ' <span class="tarteaucitronH2">' + tarteaucitron.lang.all + '</span>';
html += ' </div>'; html += ' </div>';
html += ' <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">'; html += ' <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">';
html += ' <button id="tarteaucitronAllAllowed" class="tarteaucitronAllow" onclick="tarteaucitron.userInterface.respondAll(true);">'; html += ' <button id="tarteaucitronAllAllowed" class="tarteaucitronAllow" onclick="tarteaucitron.userInterface.respondAll(true);">';
@ -347,7 +347,7 @@ var tarteaucitron = {
} else { } else {
html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig; html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig;
} }
html += ' </span>'; html += ' </span>';
html += ' <button id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">'; html += ' <button id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">';
html += ' &#10003; ' + tarteaucitron.lang.acceptAll; html += ' &#10003; ' + tarteaucitron.lang.acceptAll;
@ -383,7 +383,7 @@ var tarteaucitron = {
html += ' ' + tarteaucitron.lang.close; html += ' ' + tarteaucitron.lang.close;
html += ' </button>'; html += ' </button>';
html += ' <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">'; html += ' <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';
html += ' <h2 id="tarteaucitronCookiesNumberBis">0 cookie</h2>'; html += ' <span id="tarteaucitronCookiesNumberBis" class="tarteaucitronH2">0 cookie</span>';
html += ' </div>'; html += ' </div>';
html += ' <div id="tarteaucitronCookiesList"></div>'; html += ' <div id="tarteaucitronCookiesList"></div>';
html += ' </div>'; html += ' </div>';
@ -399,7 +399,7 @@ var tarteaucitron = {
// create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened // 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'); /*var wrapper = document.createElement('div');
wrapper.id = "contentWrapper"; wrapper.id = "contentWrapper";
while (document.body.firstChild) while (document.body.firstChild)
{ {
wrapper.appendChild(document.body.firstChild); wrapper.appendChild(document.body.firstChild);
@ -470,7 +470,7 @@ var tarteaucitron = {
// create wrapper container // create wrapper container
/*var wrapper = document.createElement('div'); /*var wrapper = document.createElement('div');
wrapper.id = "contentWrapper"; wrapper.id = "contentWrapper";
while (document.body.firstChild) while (document.body.firstChild)
{ {
wrapper.appendChild(document.body.firstChild); wrapper.appendChild(document.body.firstChild);
@ -516,7 +516,7 @@ var tarteaucitron = {
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 += ' <h3>' + service.name + '</h3>'; html += ' <span class="tarteaucitronH3">' + service.name + '</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) {
html += ' <a href="https://opt-out.ferank.eu/service/' + service.key + '/" target="_blank" rel="noopener" title="'+ tarteaucitron.lang.cookieDetail + ' ' + service.name + ' ' + tarteaucitron.lang.ourSite + ' ' + tarteaucitron.lang.newWindow +'">'; html += ' <a href="https://opt-out.ferank.eu/service/' + service.key + '/" target="_blank" rel="noopener" title="'+ tarteaucitron.lang.cookieDetail + ' ' + service.name + ' ' + tarteaucitron.lang.ourSite + ' ' + tarteaucitron.lang.newWindow +'">';
@ -782,7 +782,7 @@ var tarteaucitron = {
} }
//document.getElementById('contentWrapper').setAttribute("aria-hidden", "false"); //document.getElementById('contentWrapper').setAttribute("aria-hidden", "false");
document.getElementsByTagName('body')[0].classList.remove('modal-open'); document.getElementsByTagName('body')[0].classList.remove('modal-open');
}, },
"focusTrap": function() { "focusTrap": function() {
"use strict"; "use strict";
@ -800,23 +800,23 @@ var tarteaucitron = {
if (focusableEls[i].offsetHeight > 0) { if (focusableEls[i].offsetHeight > 0) {
filtered.push(focusableEls[i]); filtered.push(focusableEls[i]);
} }
} }
firstFocusableEl = filtered[0]; firstFocusableEl = filtered[0];
lastFocusableEl = filtered[filtered.length - 1]; lastFocusableEl = filtered[filtered.length - 1];
//loop focus inside tarteaucitron //loop focus inside tarteaucitron
document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) { document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) {
if ( evt.key === 'Tab' || evt.keyCode === 9 ) { if ( evt.key === 'Tab' || evt.keyCode === 9 ) {
if ( evt.shiftKey ) /* shift + tab */ { if ( evt.shiftKey ) /* shift + tab */ {
if (document.activeElement === firstFocusableEl) { if (document.activeElement === firstFocusableEl) {
lastFocusableEl.focus(); lastFocusableEl.focus();
evt.preventDefault(); evt.preventDefault();
} }
} else /* tab */ { } else /* tab */ {
if (document.activeElement === lastFocusableEl) { if (document.activeElement === lastFocusableEl) {
firstFocusableEl.focus(); firstFocusableEl.focus();
evt.preventDefault(); evt.preventDefault();
} }
@ -1175,16 +1175,16 @@ var tarteaucitron = {
if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) { if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) {
savedname = tarteaucitron.cookie.owner[name].join(' // '); savedname = tarteaucitron.cookie.owner[name].join(' // ');
html += '<div class="tarteaucitronHidden">'; html += '<div class="tarteaucitronHidden">';
html += ' <h3 class="tarteaucitronTitle">'; html += ' <span class="tarteaucitronTitle tarteaucitronH3">';
html += ' ' + tarteaucitron.cookie.owner[name].join(' // '); html += ' ' + tarteaucitron.cookie.owner[name].join(' // ');
html += ' </h3>'; html += ' </span>';
html += '</div><ul class="cookie-list">'; html += '</div><ul class="cookie-list">';
} else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) { } else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) {
savedname = host; savedname = host;
html += '<div class="tarteaucitronHidden">'; html += '<div class="tarteaucitronHidden">';
html += ' <h3 class="tarteaucitronTitle">'; html += ' <span class="tarteaucitronTitle tarteaucitronH3">';
html += ' ' + host; html += ' ' + host;
html += ' </h3>'; html += ' </span>';
html += '</div><ul class="cookie-list">'; html += '</div><ul class="cookie-list">';
} }
html += '<li class="tarteaucitronCookiesListMain">'; html += '<li class="tarteaucitronCookiesListMain">';