Accessibility settings to the app

Screen reader readable "Show Help" button.
Also added a new checkbox for accessibility settings.
This commit is contained in:
LL
2023-06-12 07:20:42 +09:00
parent 32f58fef1d
commit c829a539fc
14 changed files with 65 additions and 84 deletions

View File

@@ -4,17 +4,22 @@
export let check = false
export let onChange = (check) => {}
export let margin = true
export let name = ''
export let hiddenName = false
</script>
<label class:mr-2={margin}>
<input type="checkbox" class="hidden" bind:checked={check} on:change={() => {
<label title={name} class:mr-2={margin} class="flex relative">
<input title={name} type="checkbox" class='absolute opacity-0 w-6 h-6' bind:checked={check} on:change={() => {
onChange(check)
}}>
}}/>
{#if check}
<div class="w-6 h-6 bg-green-500 flex justify-center items-center text-sm">
<CheckIcon />
</div>
{:else}
<div class="w-6 h-6 bg-selected"></div>
<div class="w-6 h-6 bg-selected flex justify-center items-center text-sm"/>
{/if}
</label>
{#if name != '' && !hiddenName}
<span class="text-neutral-200 ml-2">{name}</span>
{/if}
</label>