From f838646ee0ad82ea670ecc37df20721eb90c1c85 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 21 Feb 2026 21:05:49 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20accessibili?= =?UTF-8?q?ty=20and=20search=20UX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR implements several micro-UX and accessibility improvements: 1. **Accessibility**: Added `aria-label` and `title` attributes to icon-only action buttons (Edit, Delete) in Tools, Workers, and Consumables list views. 2. **Search UX**: Added a "Clear Search" button to the search input in the shared list base template. This allows users to quickly reset their search with a single click. 3. **Bug Fix**: Fixed a malformed HTML tag in `base.html` where a `div` was incorrectly closed with a `` tag. 4. **Reliability**: Verified that all new UI elements use existing Tailwind CSS utility classes to avoid regressions in the build artifact. ♿ Accessibility: - Screen readers now announce the purpose of action buttons. - Mouse users get descriptive tooltips. - The QuickScan trigger now has valid HTML structure for the accessibility tree. - The search clear button is keyboard accessible and returns focus to the input field. Co-authored-by: Woschj <81321922+Woschj@users.noreply.github.com> --- app/templates/base.html | 2 +- app/templates/consumables/index.html | 4 ++-- app/templates/shared/list_base.html | 33 +++++++++++++++++++++++++--- app/templates/tools/index.html | 4 ++-- app/templates/workers/index.html | 4 ++-- 5 files changed, 37 insertions(+), 10 deletions(-) diff --git a/app/templates/base.html b/app/templates/base.html index d35052c..9d24adb 100755 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -243,7 +243,7 @@
- + diff --git a/app/templates/consumables/index.html b/app/templates/consumables/index.html index d68a2a9..afa3b48 100755 --- a/app/templates/consumables/index.html +++ b/app/templates/consumables/index.html @@ -100,10 +100,10 @@
- + -
diff --git a/app/templates/shared/list_base.html b/app/templates/shared/list_base.html index c89a7b4..b94ce91 100755 --- a/app/templates/shared/list_base.html +++ b/app/templates/shared/list_base.html @@ -9,13 +9,20 @@
-
+
- +
@@ -78,14 +85,34 @@

// Basis-Suchfunktion document.addEventListener('DOMContentLoaded', function() { const searchInput = document.getElementById('searchInput'); + const clearSearch = document.getElementById('clearSearch'); + if (searchInput) { searchInput.addEventListener('input', function(e) { const searchTerm = e.target.value.toLowerCase(); + + // Clear-Button anzeigen/ausblenden + if (clearSearch) { + if (searchTerm.length > 0) { + clearSearch.classList.remove('hidden'); + } else { + clearSearch.classList.add('hidden'); + } + } + document.querySelectorAll('.data-row').forEach(row => { const searchableContent = row.textContent.toLowerCase(); row.style.display = searchableContent.includes(searchTerm) ? '' : 'none'; }); }); + + if (clearSearch) { + clearSearch.addEventListener('click', function() { + searchInput.value = ''; + searchInput.focus(); + searchInput.dispatchEvent(new Event('input')); + }); + } } // Sortier-Funktionalität diff --git a/app/templates/tools/index.html b/app/templates/tools/index.html index 67b46f1..3a78220 100755 --- a/app/templates/tools/index.html +++ b/app/templates/tools/index.html @@ -158,10 +158,10 @@
{% if tool.barcode %} - + - {% else %} diff --git a/app/templates/workers/index.html b/app/templates/workers/index.html index 3823603..de9995f 100755 --- a/app/templates/workers/index.html +++ b/app/templates/workers/index.html @@ -93,10 +93,10 @@
- + -