Improve layout/behavior and accessibility
This commit is contained in:
@@ -75,7 +75,13 @@
|
||||
|
||||
{#if !has3}
|
||||
<div class="swap-col">
|
||||
<button class="swap-btn" on:click={swap} title="Swap values">
|
||||
<button
|
||||
type="button"
|
||||
class="swap-btn"
|
||||
on:click={swap}
|
||||
title="Swap values"
|
||||
aria-label="Swap conversion direction"
|
||||
>
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M7 16l-4-4 4-4M17 8l4 4-4 4M3 12h18" />
|
||||
</svg>
|
||||
@@ -111,7 +117,9 @@
|
||||
</div>
|
||||
|
||||
<div class="calc-footer">
|
||||
<button class="clear-btn" on:click={clear}>Clear</button>
|
||||
<button type="button" class="clear-btn" on:click={clear} aria-label="Clear calculator inputs">
|
||||
Clear
|
||||
</button>
|
||||
{#if config.factor && config.type === 'standard'}
|
||||
<span class="formula-hint">
|
||||
1 {config.labels.in1} = {config.factor}{config.offset ? ` + ${config.offset}` : ''} {config.labels.in2}
|
||||
|
||||
Reference in New Issue
Block a user