Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@
## 2026-02-15 - [Semantic Form Labels]
**Learning:** Even with clear visual labels, missing `for` attributes on `<label>` elements prevents proper association with inputs for assistive technologies.
**Action:** Explicitly link labels and inputs using `for` and `id` attributes in all form components.

## 2025-03-06 - [Unified List Filtering Pattern]
**Learning:** Centralizing list filtering logic in a base template using a standard naming convention for filter IDs (e.g., ending in `Filter`) and matching them to `data-` attributes on rows significantly reduces code duplication and ensures a consistent UX across all listing pages.
**Action:** Use the `[key]Filter` ID pattern for dropdowns and `data-[key]` attributes on table rows to enable automatic filtering via the shared `updateSearch` logic.

## 2025-03-06 - [Accessible Icon-Only Buttons]
**Learning:** Icon-only action buttons (like Edit/Delete) must always have an `aria-label` for screen readers and a `title` attribute for mouse-over tooltips to be fully accessible and user-friendly.
**Action:** Always provide both `aria-label` and `title` for icon-only interactive elements.
11 changes: 9 additions & 2 deletions app/templates/consumables/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,17 @@
</td>
<td class="text-right">
<div class="btn-group">
<a href="{{ url_for('consumables.detail', barcode=consumable.barcode) }}" class="btn btn-sm btn-ghost">
<a href="{{ url_for('consumables.detail', barcode=consumable.barcode) }}"
class="btn btn-sm btn-ghost"
aria-label="{{ consumable.name }} bearbeiten"
title="Bearbeiten">
<i class="fas fa-edit"></i>
</a>
<button class="btn btn-sm btn-ghost btn-error" onclick="deleteConsumable('{{ consumable.barcode }}')">
<button type="button"
class="btn btn-sm btn-ghost btn-error"
onclick="deleteItem('consumable', '{{ consumable.barcode }}')"
aria-label="{{ consumable.name }} löschen"
title="Löschen">
<i class="fas fa-trash"></i>
</button>
</div>
Expand Down
Loading