better a11y

pull/4066/head
Divyansh Singh 11 months ago
parent 9b49890105
commit 109e0c1a18

@ -440,11 +440,20 @@ function formMarkRegex(terms: Set<string>) {
<input
ref="searchInput"
v-model="filterText"
:placeholder="buttonText"
id="localsearch-input"
:aria-activedescendant="selectedIndex > -1 ? ('localsearch-item-' + selectedIndex) : undefined"
aria-autocomplete="both"
:aria-controls="results?.length ? 'localsearch-list' : undefined"
aria-labelledby="localsearch-label"
autocapitalize="off"
autocomplete="off"
autocorrect="off"
class="search-input"
id="localsearch-input"
enterkeyhint="go"
maxlength="64"
:placeholder="buttonText"
spellcheck="false"
type="search"
/>
<div class="search-actions">
<button
@ -483,8 +492,9 @@ function formMarkRegex(terms: Set<string>) {
<li
v-for="(p, index) in results"
:key="p.id"
role="option"
:id="'localsearch-item-' + index"
:aria-selected="selectedIndex === index ? 'true' : 'false'"
role="option"
>
<a
:href="p.id"

Loading…
Cancel
Save