浏览代码

Fix missing aria pressed

Amauri CHAMPEAUX 3 年之前
父节点
当前提交
c0728e0d65
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      tarteaucitron.js

+ 3 - 0
tarteaucitron.js

@@ -1040,6 +1040,9 @@ var tarteaucitron = {
                 tarteaucitron.userInterface.addClass(key + 'Line', 'tarteaucitronIsDenied');
                 document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
                 document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'true');
+            } else {
+                document.getElementById(key + 'Allowed').setAttribute('aria-pressed', 'false');
+                document.getElementById(key + 'Denied').setAttribute('aria-pressed', 'false');
             }
 
             // check if all services are allowed