From c5b4f002ec258e90d2fb6349b97aaff4f8cc143a Mon Sep 17 00:00:00 2001 From: Daphne Slootmans Date: Mon, 28 Aug 2023 15:06:08 +0200 Subject: [PATCH] Improve PrivacyConsentDialog.html.twig accessibility --- .../components/_privacyConsentDialog.scss | 46 +++++++++++++------ .../Templates/PrivacyConsentDialog.html.twig | 8 ++-- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/Frontend/Themes/Bootstrap/src/Layout/Sass/components/_privacyConsentDialog.scss b/src/Frontend/Themes/Bootstrap/src/Layout/Sass/components/_privacyConsentDialog.scss index bc9200a7e6..86f6e10341 100644 --- a/src/Frontend/Themes/Bootstrap/src/Layout/Sass/components/_privacyConsentDialog.scss +++ b/src/Frontend/Themes/Bootstrap/src/Layout/Sass/components/_privacyConsentDialog.scss @@ -1,22 +1,42 @@ #privacyConsentDialog { - box-shadow: 0 0.5rem 1rem rgba($black, 0.5); - bottom: $spacer/2; + position: fixed; display: block; height: auto; - left: $spacer/2; - right: $spacer/2; - top: auto; - width: auto; + max-height: calc(100vh - env(safe-area-inset-bottom)); + left: 0; + right: 0; + top: 0; + bottom: 0; + width: 100vw; + z-index: $zindex-modal - 1; + overflow-y: auto; + + form { + max-height: 100%; + overflow-y: auto; + } .modal-dialog { - margin: 0; + margin: 1rem; + + @include media-breakpoint-up(md) { + margin: 3rem; + } + + .modal-header, .modal-body, .modal-footer { + padding: 1rem 1rem; + } } -} -@include media-breakpoint-up(sm) { - #privacyConsentDialog { - bottom: $spacer; - left: $spacer; - right: auto; + .btn-link { + text-decoration: underline; + } + + + @include media-breakpoint-up(sm) { + left: unset; + right: unset; + top: unset; + width: auto; } } diff --git a/src/Frontend/Themes/Bootstrap/src/Layout/Templates/PrivacyConsentDialog.html.twig b/src/Frontend/Themes/Bootstrap/src/Layout/Templates/PrivacyConsentDialog.html.twig index 562b7c86f4..c297fe7688 100644 --- a/src/Frontend/Themes/Bootstrap/src/Layout/Templates/PrivacyConsentDialog.html.twig +++ b/src/Frontend/Themes/Bootstrap/src/Layout/Templates/PrivacyConsentDialog.html.twig @@ -6,15 +6,16 @@ aria-labelledby="privacyConsentDialogTitle" data-role="privacy_consent_dialog" data-bs-backdrop="false" + aria-modal="true" {% if privacyConsentDialogHide %} style="display: none" {% endif %} > -