diff --git a/tarteaucitron.js b/tarteaucitron.js
index 0f1bb75..85b2f66 100644
--- a/tarteaucitron.js
+++ b/tarteaucitron.js
@@ -380,7 +380,7 @@ var tarteaucitron = {
for (i = 0; i < cat.length; i += 1) {
html += '
';
html += ' ';
- html += ' ' + tarteaucitron.lang[cat[i]].title + ' ';
+ html += ' ' + tarteaucitron.lang[cat[i]].title + ' ';
html += '
';
html += ' ';
html += ' ' + tarteaucitron.lang[cat[i]].details;
@@ -749,6 +749,11 @@ var tarteaucitron = {
toggleBtns[i].dataset.index = i;
tarteaucitron.addClickEventToElement(toggleBtns[i], function () {
tarteaucitron.userInterface.toggle('tarteaucitronDetails' + cat[this.dataset.index], 'tarteaucitronInfoBox');
+ if (document.getElementById('tarteaucitronDetails' + cat[this.dataset.index]).style.display === 'block') {
+ this.setAttribute('aria-expanded', 'true');
+ } else {
+ this.setAttribute('aria-expanded', 'false');
+ }
return false;
});
}