Skip to content

Commit 301e56c

Browse files
committed
feat: update accessibility and make visible only on focus/hover
1 parent 8bcbeed commit 301e56c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/components/Header/SearchBox.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@ defineExpose({ focus })
6767
v-if="hasSearchQuery"
6868
type="button"
6969
:aria-label="$t('common.close')"
70-
class="absolute inset-ie-2 inline-flex h-6 w-6 items-center justify-center rounded text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"
70+
class="absolute inset-ie-2 h-6 w-6 items-center justify-center rounded text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent group-focus-within:flex group-hover:inline-flex hidden"
7171
@click="clearSearch"
72+
aria-hidden="true"
73+
tabindex="-1"
7274
>
73-
<span class="i-lucide:circle-x h-4 w-4" aria-hidden="true" />
75+
<span class="i-lucide:circle-x h-4 w-4" />
7476
</button>
7577
<button type="submit" class="sr-only">{{ $t('search.button') }}</button>
7678
</div>

0 commit comments

Comments
 (0)