From 28a917fca5d0ca285e6cd0fca3fa6dfc0aa7d363 Mon Sep 17 00:00:00 2001 From: Laura_Escamilla Date: Wed, 4 Feb 2026 14:26:47 +0000 Subject: [PATCH] Bug 39662: Accessiblity updates to the clear button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test: 1. Load http://localhost:8080/cgi-bin/koha/opac-memberentry.pl. 2. Note that next to the date of birth calendar there is an X icon which may appear as an error indicator. 3. Apply the patch. Run a yarn build and restart_all, then clear your browser cache if necessary. 4. Reload the page from step 1. 5. Confirm that the X icon is now a circle-X with neutral styling and no longer resembles an error indicator. 6. Verify that the control is clearly interactive: * You can add a date and clear it using the icon * The icon can be focused via keyboard and activated with Enter or Space 7. Sign off — have an amazing day! :D --- .../opac-tmpl/bootstrap/en/includes/calendar.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc index 240fa9953c..797dada3f8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc @@ -95,9 +95,16 @@ e.preventDefault(); instance.clear(); }) - .addClass("fa fa-fw fa-times") - .attr("aria-hidden", false) + .addClass("fa fa-fw fa-times-circle") + .attr("role", "button") .attr("aria-label", _("Clear date")) + .attr("title", _("Clear date")) + .on("keydown", function (e) { + if (e.key === "Enter" || e.key === " " || e.key === "Spacebar") { + e.preventDefault(); + instance.clear(); + } + }) ) .keydown(function (e) { var key = event.keyCode ? event.keyCode : event.which; -- 2.39.5