Skip to content

Commit

Permalink
Hide items with hidden attribute instead of display style
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgds committed Feb 12, 2021
1 parent 7b2d261 commit fbedc58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
CookieBanner.prototype.showConfirmationMessage = function () {
this.$cookieBannerMainContent = document.querySelector('.gem-c-cookie-banner__wrapper')

this.$cookieBannerMainContent.style.display = 'none'
this.$cookieBannerMainContent.hidden = true
this.$module.cookieBannerConfirmationMessage.style.display = 'block'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</div>
</div>

<div class="gem-c-cookie-banner__confirmation govuk-width-container" tabindex="-1">
<div class="gem-c-cookie-banner__confirmation govuk-width-container" tabindex="-1" hidden>
<p class="gem-c-cookie-banner__confirmation-message" role="alert"><%= confirmation_message %></p>
<button class="gem-c-cookie-banner__hide-button" data-hide-cookie-banner="true" data-module="track-click" data-track-category="cookieBanner" data-track-action="Hide cookie banner">Hide</button>
</div>
Expand Down

0 comments on commit fbedc58

Please sign in to comment.