From fbedc58af8a84b82ab389b0c8e814aa255104bd5 Mon Sep 17 00:00:00 2001 From: maxgds Date: Fri, 12 Feb 2021 09:47:24 +0000 Subject: [PATCH] Hide items with hidden attribute instead of display style --- .../govuk_publishing_components/components/cookie-banner.js | 2 +- .../components/_cookie_banner.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js b/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js index 8e58f265a0..c94241b0e3 100644 --- a/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +++ b/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js @@ -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' } diff --git a/app/views/govuk_publishing_components/components/_cookie_banner.html.erb b/app/views/govuk_publishing_components/components/_cookie_banner.html.erb index e166f6c3c5..187f53351a 100644 --- a/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +++ b/app/views/govuk_publishing_components/components/_cookie_banner.html.erb @@ -72,7 +72,7 @@ -