From ab4053890c0b55a99246217efaa579e711d7d7dd Mon Sep 17 00:00:00 2001 From: Nell Date: Sun, 18 Oct 2026 14:25:56 +1100 Subject: [PATCH 1/2] Mark the current page in the navigation with aria-current --- apps/frontend/static_src/js/active-nav-item/index.js | 1 + apps/frontend/static_src/js/active-nav-item/index.test.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/apps/frontend/static_src/js/active-nav-item/index.js b/apps/frontend/static_src/js/active-nav-item/index.js index 677379fb..c88867df 100644 --- a/apps/frontend/static_src/js/active-nav-item/index.js +++ b/apps/frontend/static_src/js/active-nav-item/index.js @@ -3,6 +3,7 @@ export const initActiveNavItem = () => { links.forEach((link) => { if (new URL(link.href).pathname === window.location.pathname) { link.classList.add('active'); + link.setAttribute('aria-current', 'page'); } }); }; diff --git a/apps/frontend/static_src/js/active-nav-item/index.test.js b/apps/frontend/static_src/js/active-nav-item/index.test.js index 560bed19..c62070d4 100644 --- a/apps/frontend/static_src/js/active-nav-item/index.test.js +++ b/apps/frontend/static_src/js/active-nav-item/index.test.js @@ -17,4 +17,12 @@ describe('initActiveNavItem', () => { expect(concepts.classList.contains('active')).toBe(false); expect(guides.classList.contains('active')).toBe(true); }); + + it('marks only the link matching the current path as the current page', () => { + initActiveNavItem(); + + const [concepts, guides] = document.querySelectorAll('.navigation__link'); + expect(concepts.hasAttribute('aria-current')).toBe(false); + expect(guides.getAttribute('aria-current')).toBe('page'); + }); }); From 3f8074de54877497ebd7604d3a36b110b9ebbc7b Mon Sep 17 00:00:00 2001 From: Nell Date: Sun, 18 Oct 2026 14:25:56 +1100 Subject: [PATCH 2/2] Announce feedback confirmation and keep focus after feedback is sent --- apps/core/templates/components/feedback.html | 1 + apps/core/tests/test_feedback.py | 10 +++ apps/frontend/static_src/js/feedback/index.js | 10 ++- .../static_src/js/feedback/index.test.js | 86 +++++++++++++++++++ .../static_src/scss/components/feedback.scss | 5 ++ 5 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 apps/frontend/static_src/js/feedback/index.test.js diff --git a/apps/core/templates/components/feedback.html b/apps/core/templates/components/feedback.html index 14cf82df..414e5315 100644 --- a/apps/core/templates/components/feedback.html +++ b/apps/core/templates/components/feedback.html @@ -13,6 +13,7 @@