Browse Source

Add aria-label to token field on admin login page

This makes it possible for Bitwarden to autofill admin token by using
a Custom Field [1] named "Admin token". Autofill for custom fields works
by matching a form element's id, name, aria-label, or placeholder [2].

[1] https://bitwarden.com/help/custom-fields/
[2] https://bitwarden.com/help/auto-fill-custom-fields/

Signed-off-by: Martin Stenröse <martin@stenrose.se>
pull/6649/head
Martin Stenröse 6 days ago
parent
commit
a8da38701c
Failed to extract signature
  1. 2
      src/static/templates/admin/login.hbs

2
src/static/templates/admin/login.hbs

@ -13,7 +13,7 @@
<small>Please provide it below:</small>
<form class="form-inline" method="post" action="{{urlpath}}/admin">
<input type="password" autocomplete="password" class="form-control w-50 mr-2" name="token" placeholder="Enter admin token" autofocus="autofocus">
<input type="password" autocomplete="password" class="form-control w-50 mr-2" name="token" aria-label="Admin token" placeholder="Enter admin token" autofocus="autofocus">
{{#if redirect}}
<input type="hidden" id="redirect" name="redirect" value="/{{redirect}}">
{{/if}}

Loading…
Cancel
Save