Skip to content

Commit

Permalink
second pass through /login: validate/audit
Browse files Browse the repository at this point in the history
  • Loading branch information
cfm committed Jul 13, 2021
1 parent b87603a commit 484cbd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion securedrop/source_templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ <h1>{{ gettext('Enter Codename') }}</h1>
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">

<div class="center">
{{ form.codename(id='login-with-existing-codename', class='codename-box', autocomplete='off', placeholder=gettext('Enter your codename'), autofocus=True, **{'aria-label': gettext('Enter your codename'), 'aria-required': 'true', 'aria-describedby': 'flashed login-with-existing-code-name-errors', 'aria-invalid': 'true' if form.codename.errors else 'false'}) }}
{% set aria_attributes = {'aria-label': gettext('Enter your codename'), 'aria-required': 'true'} %}
{% if form.codename.errors %}
{% set _dummy = aria_attributes.update({'aria-describedby': 'flashed login-with-existing-code-name-errors', 'aria-invalid': 'true'}) %}
{% endif %}
{{ form.codename(id='login-with-existing-codename', class='codename-box', autocomplete='off', placeholder=gettext('Enter your codename'), autofocus=True, **aria_attributes) }}
{% if form.codename.errors %}
<ul id="login-with-existing-code-name-errors" class="form-validation-error" role="alert">
{% for error in form.codename.errors %}
Expand Down

0 comments on commit 484cbd7

Please sign in to comment.