Skip to content

Commit

Permalink
Fix #544: missing aria-level attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
orestbida committed Aug 6, 2023
1 parent 1bcf9cb commit ecc9d6d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/cookieconsent.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,8 @@
if(consent_modal_title_value){

if(!consent_modal_title){
consent_modal_title = _createNode('div');
consent_modal_title = _createNode('h2');
consent_modal_title.id = 'c-ttl';
consent_modal_title.setAttribute('role', 'heading');
consent_modal_title.setAttribute('aria-level', '2');
consent_modal_inner_inner.appendChild(consent_modal_title);
}

Expand Down Expand Up @@ -594,7 +592,7 @@
var settings = _createNode('div');
var settings_container_inner = _createNode('div');
settings_inner = _createNode('div');
settings_title = _createNode('div');
settings_title = _createNode('h2');
var settings_header = _createNode('div');
settings_close_btn = _createNode('button');
settings_close_btn.appendChild(generateFocusSpan(2));
Expand Down Expand Up @@ -650,7 +648,6 @@
settings_container.setAttribute('aria-modal', 'true');
settings_container.setAttribute('aria-hidden', 'true');
settings_container.setAttribute('aria-labelledby', 's-ttl');
settings_title.setAttribute('role', 'heading');
settings_container.style.visibility = overlay.style.visibility = "hidden";
overlay.style.opacity = 0;

Expand Down

0 comments on commit ecc9d6d

Please sign in to comment.