Skip to content

Commit

Permalink
Update role
Browse files Browse the repository at this point in the history
  • Loading branch information
CountNick committed Jul 31, 2024
1 parent bba5f4b commit 2af0d39
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cookie-consent.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class Dialog extends HTMLElement {
this.tabList.init();

const template = `
<aside part="${this.config.prefix}" id="${this.config.prefix}" class="${this.config.prefix} js-cookie-bar" aria-role="dialog" aria-live="polite" aria-labelledby="${this.config.prefix}__title" aria-describedby="${this.config.prefix}-description" aria-hidden="true" tabindex="0">
<aside part="${this.config.prefix}" id="${this.config.prefix}" class="${this.config.prefix} js-cookie-bar" role="dialog" aria-live="polite" aria-labelledby="${this.config.prefix}__title" aria-describedby="${this.config.prefix}-description" aria-hidden="true" tabindex="0">
<!--googleoff: all-->
<header part="${this.config.prefix}__header" class="${this.config.prefix}__header" id="${this.config.prefix}-description">
<h1 part="${this.config.prefix}__title" id="${this.config.prefix}__title">${this.data.title}</h1>
Expand Down Expand Up @@ -185,7 +185,9 @@ export default class Dialog extends HTMLElement {
const checkedCount = values.filter((v) => v.accepted).length;
const userOptionsChecked = checkedCount >= requiredCount;
if (
this.data.acceptAllButton && this.config.type === "checkbox" && !userOptionsChecked
this.data.acceptAllButton &&

Check failure on line 188 in src/cookie-consent.mjs

View workflow job for this annotation

GitHub Actions / CI (16)

'&&' should be placed at the beginning of the line

Check failure on line 188 in src/cookie-consent.mjs

View workflow job for this annotation

GitHub Actions / CI (18)

'&&' should be placed at the beginning of the line
this.config.type === "checkbox" &&

Check failure on line 189 in src/cookie-consent.mjs

View workflow job for this annotation

GitHub Actions / CI (16)

'&&' should be placed at the beginning of the line

Check failure on line 189 in src/cookie-consent.mjs

View workflow job for this annotation

GitHub Actions / CI (18)

'&&' should be placed at the beginning of the line
!userOptionsChecked
) {
return values.map((value) => ({
...value,
Expand Down Expand Up @@ -248,7 +250,8 @@ export default class Dialog extends HTMLElement {
// Loop through arrayfiedTabListChildren
tabListChildren.forEach((input) => {
// Find all input elements
const inputElement = input.firstElementChild.firstElementChild.firstElementChild;
const inputElement =

Check failure on line 253 in src/cookie-consent.mjs

View workflow job for this annotation

GitHub Actions / CI (16)

There should be no line break before or after '='

Check failure on line 253 in src/cookie-consent.mjs

View workflow job for this annotation

GitHub Actions / CI (18)

There should be no line break before or after '='
input.firstElementChild.firstElementChild.firstElementChild;
// Loop through updated cookies
this.cookies.forEach((cookie) => {
// set the checked state to the updated cookie state
Expand Down

0 comments on commit 2af0d39

Please sign in to comment.