Skip to content

Commit

Permalink
expands ARIA-LABELs to add context to recurring UI elements
Browse files Browse the repository at this point in the history
  • Loading branch information
cfm committed Dec 13, 2021
1 parent f54157a commit 3995452
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ <h1>{{ gettext('Enable YubiKey (OATH-HOTP)') }}</h1>
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<label for="token">{{ gettext('Verification code') }}</label>
<input name="token" id="token" type="text" placeholder="123456">
<button type="submit" aria-label="{{ gettext('Submit') }}">{{ gettext('SUBMIT') }}</button>
<button type="submit" aria-label="{{ gettext('Submit verification code') }}">{{ gettext('SUBMIT') }}</button>
</form>
{% endblock %}
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h2 id="users-heading" class="visually-hidden">Users</h2>

<section aria-labelledby="update-instance-config-heading">
<h2 id="update-instance-config-heading" class="visually-hidden">Update Instance Config</h2>
<a href="{{ url_for('admin.manage_config') }}" class="btn" id="update-instance-config" aria-label="{{ gettext('Instance Config') }}">
<a href="{{ url_for('admin.manage_config') }}" class="btn" id="update-instance-config" aria-label="{{ gettext('Update instance config') }}">
{# FIXME:
<img src="{{ url_for('static', filename='icons/pencil-alt.png') }}" class="icon" width="15" height="15" alt="">
#}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ <h1>{{ gettext('Enable YubiKey (OATH-HOTP)') }}</h1>
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<label for="token">{{ gettext('Verification code') }}</label>
<input name="token" id="token" type="text" placeholder="123456">
<button type="submit" aria-label="{{ gettext('Submit') }}">{{ gettext('SUBMIT') }}</button>
<button type="submit" aria-label="{{ gettext('Submit verification code') }}">{{ gettext('SUBMIT') }}</button>
</form>
{% endblock %}
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/col.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h2>{{ gettext('Reply') }}</h2>
{# FIXME:
<hr class="no-line">
#}
<button id="reply-button" class="button pull-right" type="submit" aria-label="{{ gettext('Submit') }}">{{ gettext('SUBMIT') }}</button>
<button id="reply-button" class="button pull-right" type="submit" aria-label="{{ gettext('Submit reply') }}">{{ gettext('SUBMIT') }}</button>
</form>
{% else %}
<p class="notification">{{ gettext("This source has no encryption key.") }}</p>
Expand Down
4 changes: 2 additions & 2 deletions securedrop/journalist_templates/edit_account.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2 id="change-heading">{{ gettext('Change Name and Admin Status') }}</h2>
<input name="is_admin" id="is-admin" type="checkbox" {% if user.is_admin %}checked{% endif %}>
<label for="is-admin">{{ gettext('Is Admin') }}</label>
</div>
<button type="submit" id="update" aria-label="{{ gettext('Update') }}">{{ gettext('UPDATE') }}</button>
<button type="submit" id="update" aria-label="{{ gettext('Update account') }}">{{ gettext('UPDATE') }}</button>
</form>
</section>
{% else %}
Expand All @@ -48,7 +48,7 @@ <h2 id="change-heading">{{ gettext('Change Name') }}</h2>
{% set last_name = g.user.last_name or '' %}
<input name="last_name" id="last_name" value = "{{ last_name }}">
</div>
<button type="submit" id="change-name-button" aria-label="{{ gettext('Update') }}">{{ gettext('UPDATE') }}</button>
<button type="submit" id="change-name-button" aria-label="{{ gettext('Update your account') }}">{{ gettext('UPDATE') }}</button>
</form>
</section>
{% endif %}
Expand Down

0 comments on commit 3995452

Please sign in to comment.