From d41b239861ad91f32f2e0abf8ea5f3025e91d5de Mon Sep 17 00:00:00 2001 From: Paul Stanton Date: Wed, 30 Apr 2025 12:14:35 +0100 Subject: [PATCH 1/2] Delete fonts/_config.fonts.scss --- fonts/_config.fonts.scss | 49 ---------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 fonts/_config.fonts.scss diff --git a/fonts/_config.fonts.scss b/fonts/_config.fonts.scss deleted file mode 100644 index fe53fa2bbe..0000000000 --- a/fonts/_config.fonts.scss +++ /dev/null @@ -1,49 +0,0 @@ -$font-family-light: 'proxima_novalight', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; -$font-family-regular: 'proxima_nova_rgregular', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; -$font-family-heading: 'code_pro_bold', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; -$font-family-heading-light: 'code_pro_regular', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; -$font-family-icons: 'Font Awesome 6 Free'; -$font-family-brands: 'Font Awesome 6 Brands'; - -// Font awesome -$fa-path: '../fonts/fontawesome-free-6.0.0-web' !default; -$fa-font-path: $fa-path + '/webfonts' !default; -$fa-css-prefix: 'icon'; - -@import '../fonts/fontawesome-free-6.0.0-web/scss/fontawesome'; -@import '../fonts/fontawesome-free-6.0.0-web/scss/regular'; -@import '../fonts/fontawesome-free-6.0.0-web/scss/solid'; -@import '../fonts/fontawesome-free-6.0.0-web/scss/brands'; -@import '../fonts/fontawesome-free-6.0.0-web/scss/v4-shims'; - -@font-face { - font-family: 'proxima_novalight'; - src: url($font-path + 'proxima_nova/proximanova-light.woff2') format('woff2'), - url($font-path + 'proxima_nova/proximanova-light.woff') format('woff'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'proxima_nova_rgregular'; - src: url($font-path + 'proxima_nova/proximanova-regular.woff2') format('woff2'), - url($font-path + 'proxima_nova/proximanova-regular.woff') format('woff'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'code_pro_bold'; - src: url($font-path + 'code_pro/code_pro_bold_lc-webfont.woff2') format('woff2'), - url($font-path + 'code_pro/code_pro_bold_lc-webfont.woff') format('woff'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'code_pro_regular'; - src: url($font-path + 'code_pro/code_pro_lc-webfont.woff2') format('woff2'), - url($font-path + 'code_pro/code_pro_lc-webfont.woff') format('woff'); - font-weight: normal; - font-style: normal; -} From 5fdb864cae7c326ec6ae8007b6b6c770e714e5d7 Mon Sep 17 00:00:00 2001 From: steveojadu <54797618+steveojadu@users.noreply.github.com> Date: Tue, 13 May 2025 15:38:33 +0100 Subject: [PATCH 2/2] Add focus management to help box --- js/HelpTextComponent.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/js/HelpTextComponent.js b/js/HelpTextComponent.js index ab2c9cf57b..cf490e291c 100644 --- a/js/HelpTextComponent.js +++ b/js/HelpTextComponent.js @@ -48,10 +48,14 @@ HelpTextComponent.prototype.toggleHelpSidebar = function () { $tabHelpContainer = component.$html.find('.tab-help-container'); if ($mobileToggleHelpButton.hasClass('is-open')) { - $mobileToggleHelpButton.removeClass('is-open'); + $mobileToggleHelpButton + .removeClass('is-open') + .attr('aria-expanded', 'false'); component.toggleChildElementInteractivity($tabHelpContainer, false); } else { - $mobileToggleHelpButton.addClass('is-open'); + $mobileToggleHelpButton + .addClass('is-open') + .attr('aria-expanded', 'true'); component.toggleChildElementInteractivity($tabHelpContainer, true); } @@ -61,10 +65,12 @@ HelpTextComponent.prototype.toggleHelpSidebar = function () { $tabHelpContainer .addClass('hide') .attr('aria-hidden', 'true'); + component.$html.find('.js-show-page-help').trigger('focus'); } else { + // Set focus immediately, then handle animation + component.$html.find('.js-show-page-help').trigger('focus'); + $tabHelpContainer.one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) { - component.$html.find('.js-show-page-help').trigger('focus'); - $tabHelpContainer .addClass('hide') .attr('aria-hidden', 'true'); @@ -76,9 +82,12 @@ HelpTextComponent.prototype.toggleHelpSidebar = function () { .removeAttr('aria-hidden'); component.$html.addClass('open-help'); - // Jump focus to the help container + // Set focus immediately, then handle animation + $tabHelpContainer.find('.js-close-page-help').trigger('focus'); + + // Handle animation completion separately $tabHelpContainer.one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) { - $tabHelpContainer.find('.js-close-page-help').trigger('focus'); + // Animation completed, no additional focus management needed }); } };