From 4870447e69ac24b5ac5fffdae22f3c63789d9c46 Mon Sep 17 00:00:00 2001 From: Jan Sarenik Date: Wed, 14 Jun 2023 17:26:39 +0200 Subject: [PATCH] Improve keyboard accessibility (tabindex) Also disables autocomplete, autocapitalize and autocorrect on search textbox. --- views/layout.pug | 4 ++-- views/search.pug | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/views/layout.pug b/views/layout.pug index 98145a382..f2eac6837 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -204,10 +204,10 @@ html(lang="en") - form.form-inline.d-none.d-lg-inline(method="post", action="./search", style="width: 325px;") + form.form-inline.d-none.d-lg-inline(method="post", action="./search", style="width: 325px;", autocomplete="off") input(type="hidden", name="_csrf", value=csrfToken) .input-group - input.form-control(type="text", name="query", placeholder="block height/hash, txid, address", value=(query)) + input.form-control(type="text", name="query", placeholder="block height/hash, txid, address", autocorrect="off", autocapitalize="off", tabindex="1") button.btn.btn-primary(type="submit", aria-label="Search") i.bi-search diff --git a/views/search.pug b/views/search.pug index 6d2f72978..1e9a444f3 100644 --- a/views/search.pug +++ b/views/search.pug @@ -7,11 +7,9 @@ block content +pageTitle("Search") +contentSection - form.form.form-inline(method="post", action="./search") + form.form.form-inline(method="post", action="./search", autocomplete="off") input(type="hidden", name="_csrf", value=csrfToken) div.input-group - input.form-control(type="text", name="query", placeholder="block height/hash, txid, address", value=(query), style="width: 400px;") - + input.form-control(type="text", name="query", placeholder="block height/hash, txid, address", tabindex="1", autocapitalize="off", autocorrect="off", style="width: 400px;") button.btn.btn-primary(type="submit") Search -