From 30e8ad3f709d76700c59e2e39a01ab7167f2293d Mon Sep 17 00:00:00 2001
From: Moritz Strohm <strohm@data-quest.de>
Date: Fri, 24 May 2024 07:48:31 +0000
Subject: [PATCH] MultiPersonSearch: made icons for starting and resetting the
 search accessible, fixes #4029

Closes #4029

Merge request studip/studip!2901
---
 app/views/multipersonsearch/js_form.php        | 8 ++++++--
 resources/assets/stylesheets/scss/buttons.scss | 9 ++++++---
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/views/multipersonsearch/js_form.php b/app/views/multipersonsearch/js_form.php
index ca1a1ab48a0..1862c84d90d 100644
--- a/app/views/multipersonsearch/js_form.php
+++ b/app/views/multipersonsearch/js_form.php
@@ -10,8 +10,12 @@
             <span><?= htmlReady($description); ?></span>
             <input id="<?= $name . '_searchinput'; ?>" type="text" placeholder="<?= _("Suchen"); ?>" value="" name="<?= $name . '_searchinput'; ?>" style="width: 260px;" aria-label="<?= _("Suchen"); ?>">
 
-            <?= Icon::create('search', 'clickable', ['title' => _('Suche starten')])->asImg(16, ['onclick' => 'STUDIP.MultiPersonSearch.search()']) ?>
-            <?= Icon::create('decline', 'clickable', ['title' => _('Suche zurücksetzen')])->asImg(16, ['onclick' => 'STUDIP.MultiPersonSearch.resetSearch()']) ?>
+            <button class="icon-button enter-accessible" onclick='STUDIP.MultiPersonSearch.search();return false' title="<?= _('Suche starten') ?>">
+                <?= Icon::create('search')->asImg(['class' => 'text-bottom']) ?>
+            </button>
+            <button class="icon-button enter-accessible" onclick='STUDIP.MultiPersonSearch.resetSearch(); return false' title="<?= _('Suche zurücksetzen') ?>">
+                <?= Icon::create('decline')->asImg(['class' => 'text-bottom']) ?>
+            </button>
         </label>
         <p><? foreach($quickfilter as $title => $users) : ?>
             <a href="#" class="quickfilter" data-quickfilter="<?= md5($title); ?>"><?= htmlReady($title); ?> (<?= count($users); ?>)</a>
diff --git a/resources/assets/stylesheets/scss/buttons.scss b/resources/assets/stylesheets/scss/buttons.scss
index b7235f7d0ca..c60db449e48 100644
--- a/resources/assets/stylesheets/scss/buttons.scss
+++ b/resources/assets/stylesheets/scss/buttons.scss
@@ -137,9 +137,12 @@ button.button {
 }
 
 
-button.styleless {
-    background-color: unset;
-    border: 0;
+button {
+    &.styleless,
+    &.icon-button {
+        background-color: unset;
+        border: 0;
+    }
 }
 
 button.as-link {
-- 
GitLab