fix: resolve Svelte build warnings
- Add keyboard handler to fab-modal and dialog overlays (a11y) - Remove unused .btn-cancel CSS selector - Wrap meal name input inside its label, use span for ingredients heading - Change image-wrap-desktop from div to figure for valid figcaption
This commit is contained in:
@@ -792,7 +792,7 @@
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div class="fab-overlay" onclick={closeFabModal} onkeydown={(e) => e.key === 'Escape' && closeFabModal()}>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions a11y_click_events_have_key_events -->
|
||||
<div class="fab-modal" onclick={(e) => e.stopPropagation()}>
|
||||
<div class="fab-modal" onclick={(e) => e.stopPropagation()} onkeydown={(e) => e.stopPropagation()}>
|
||||
<div class="fab-modal-header">
|
||||
<h3>{t('add_food', lang)}</h3>
|
||||
<button class="fab-close" onclick={closeFabModal}><Plus size={18} style="transform: rotate(45deg)" /></button>
|
||||
@@ -1596,8 +1596,7 @@
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
.btn-secondary,
|
||||
.btn-cancel {
|
||||
.btn-secondary {
|
||||
padding: 0.5rem 1.1rem;
|
||||
background: var(--color-bg-tertiary);
|
||||
color: var(--color-text-primary);
|
||||
@@ -1608,9 +1607,6 @@
|
||||
font-weight: 500;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.btn-cancel:hover {
|
||||
background: var(--color-bg-elevated);
|
||||
}
|
||||
|
||||
/* ── Day Total ── */
|
||||
/* ── FAB Modal ── */
|
||||
|
||||
@@ -172,16 +172,18 @@
|
||||
<div class="form-card">
|
||||
<h2 class="form-title">{editingId ? t('edit', lang) : t('new_meal', lang)}</h2>
|
||||
|
||||
<label class="field-label">{t('meal_name', lang)}</label>
|
||||
<input
|
||||
type="text"
|
||||
class="text-input"
|
||||
bind:value={mealName}
|
||||
placeholder={t('meal_name', lang)}
|
||||
/>
|
||||
<label class="field-label">
|
||||
{t('meal_name', lang)}
|
||||
<input
|
||||
type="text"
|
||||
class="text-input"
|
||||
bind:value={mealName}
|
||||
placeholder={t('meal_name', lang)}
|
||||
/>
|
||||
</label>
|
||||
|
||||
<!-- Ingredients list -->
|
||||
<label class="field-label">{t('ingredients', lang)} ({ingredients.length})</label>
|
||||
<span class="field-label">{t('ingredients', lang)} ({ingredients.length})</span>
|
||||
{#if ingredients.length > 0}
|
||||
<div class="ingredients-list">
|
||||
{#each ingredients as ing, i}
|
||||
|
||||
Reference in New Issue
Block a user