(a11y) make search button focusable

This commit is contained in:
Valentyne Stigloher 2025-04-15 16:18:49 +02:00
parent 6ef00ba113
commit a5c8702b4f

View File

@ -306,7 +306,7 @@ const dismissCensus = (): void => {
</template>
</PotentiallyExternalLink>
</template>
<span class="nav-item btn btn-sm position-relative" @click="searchDialogue?.open()">
<button type="button" class="nav-item nav-header btn btn-sm position-relative" @click="searchDialogue?.open()">
<span style="position: absolute; right: 0.1em; top: 0.1em; opacity: 0.7; z-index: -1">
<ClientOnly>
<kbd class="bg-light text-dark border">{{ isMac ? '⌘K' : 'Ctrl+K' }}</kbd>
@ -315,7 +315,7 @@ const dismissCensus = (): void => {
<Icon v="search" :size="1.6" />
<br>
<T>search.header</T>
</span>
</button>
<div class="nav-item flex-grow-0" @mouseenter="hoverItem = null">
<VersionDropdown end />
</div>
@ -370,10 +370,10 @@ const dismissCensus = (): void => {
<Spelling :text="link.textLong || link.text" />
</PotentiallyExternalLink>
</template>
<span class="btn btn-sm" @click="searchDialogue?.open()">
<button type="button" class="btn btn-sm" @click="searchDialogue?.open()">
<Icon v="search" />
<T>search.header</T>
</span>
</button>
</div>
</div>
</div>