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:
@@ -84,12 +84,12 @@
|
||||
</script>
|
||||
|
||||
<div class="sticky-image-layout" class:overlay={mode === 'overlay'}>
|
||||
<div class="image-wrap-desktop">
|
||||
<figure class="image-wrap-desktop">
|
||||
<img {src} {alt}>
|
||||
{#if caption}
|
||||
<figcaption class="image-caption">{@html caption}</figcaption>
|
||||
{/if}
|
||||
</div>
|
||||
</figure>
|
||||
<PipImage {pip} {src} {alt} visible={inView} bind:el={pipEl} />
|
||||
<div class="content-scroll" bind:this={contentEl}>
|
||||
{@render children()}
|
||||
@@ -109,6 +109,7 @@
|
||||
}
|
||||
.image-wrap-desktop {
|
||||
display: none;
|
||||
margin: 0;
|
||||
}
|
||||
.image-caption {
|
||||
font-size: 0.8rem;
|
||||
|
||||
@@ -188,8 +188,8 @@
|
||||
{#if showDialog}
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div class="dialog-overlay" onclick={() => showDialog = false} onkeydown={(e) => e.key === 'Escape' && (showDialog = false)}>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div class="dialog" onclick={(e) => e.stopPropagation()}>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions a11y_click_events_have_key_events -->
|
||||
<div class="dialog" onclick={(e) => e.stopPropagation()} onkeydown={(e) => e.stopPropagation()}>
|
||||
<div class="dialog-header">
|
||||
<h3>{labels.addToLog}</h3>
|
||||
<button class="close-btn" onclick={() => showDialog = false}><X size={18} /></button>
|
||||
|
||||
Reference in New Issue
Block a user