From cbe7931366cfcc4e458759da17f08095bf89a665 Mon Sep 17 00:00:00 2001 From: Victoria Nduka <122698422+nwanduka@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:05:35 +0100 Subject: [PATCH] Accessibility: Add Enter key support for back button navigation --- apps/dev-workbench/workbench.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/dev-workbench/workbench.js b/apps/dev-workbench/workbench.js index 2a408cd2c..39a6de33c 100644 --- a/apps/dev-workbench/workbench.js +++ b/apps/dev-workbench/workbench.js @@ -8,6 +8,13 @@ $('#goBack').click(function() { window.history.back(); }); +// Keydown event for the back button +$('#goBack').keydown(function(e) { + if (e.keyCode === 13) { + window.history.back(); + } +}); + // initialize Step 1 function dataSelect() { $('.navbar-brand').text(' Workbench - Step 1');