diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c9454b..df756c63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Update gem dependencies. - Declare some missing indirect dependencies to prepare for Ruby 3.4. This also resolves some warnings about this at build time. - Remove aria-hidden from search label to let assistive technologies see its accessible name +- Use hidden attribute to show/hide expiry notices instead of just CSS ## 3.5.0 diff --git a/lib/assets/javascripts/_modules/page-expiry.js b/lib/assets/javascripts/_modules/page-expiry.js index 1bc228b0..983201d6 100644 --- a/lib/assets/javascripts/_modules/page-expiry.js +++ b/lib/assets/javascripts/_modules/page-expiry.js @@ -7,8 +7,8 @@ var isExpired = Date.parse(rawDate) < new Date() if (isExpired) { - $element.find('.page-expiry--not-expired').hide(0) - $element.find('.page-expiry--expired').show(0) + $element.find('.page-expiry--not-expired').attr('hidden', '') + $element.find('.page-expiry--expired').removeAttr('hidden') } } } diff --git a/lib/assets/stylesheets/modules/_page-review.scss b/lib/assets/stylesheets/modules/_page-review.scss index 753617a4..dd449667 100644 --- a/lib/assets/stylesheets/modules/_page-review.scss +++ b/lib/assets/stylesheets/modules/_page-review.scss @@ -24,8 +24,6 @@ } .page-expiry--expired { - display: none; - padding: govuk-spacing(3); margin-top: govuk-spacing(9); border: govuk-spacing(1) solid $govuk-error-colour; diff --git a/lib/source/layouts/_page_review.erb b/lib/source/layouts/_page_review.erb index 3327eee4..6550f56f 100644 --- a/lib/source/layouts/_page_review.erb +++ b/lib/source/layouts/_page_review.erb @@ -12,7 +12,7 @@ <% if current_page_review.show_expiry? %> -