Skip to content

Commit

Permalink
adds "button" role to non-navigating links (per review feedback)
Browse files Browse the repository at this point in the history
  • Loading branch information
cfm committed Jul 28, 2021
1 parent c8baf3d commit 753da75
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions securedrop/source_templates/lookup.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2 id="submit-heading" class="headline">{{ gettext('Submit Messages') }}</h2>



<a href="{{ url_for('main.lookup') }}" class="btn secondary" id="cancel" aria-label="{{ gettext('Cancel') }}">
<a href="{{ url_for('main.lookup') }}" class="btn secondary" id="cancel" role="button" aria-label="{{ gettext('Cancel') }}">
{{ gettext('CANCEL') }}
</a>
</div>
Expand All @@ -70,27 +70,27 @@ <h2 id="replies-heading" class="headline">{{ gettext('Read Replies') }}</h2>
<form id="delete" class="message" method="post" action="{{ url_for('main.delete') }}" autocomplete="off">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<input type="hidden" name="reply_filename" value="{{ reply.filename }}" autocomplete="off">
<a href="#confirm-delete-{{ reply.filename }}" id="delete-reply-{{ reply.filename }}" class="delete" aria-label="{{ gettext('Delete this reply') }}">
<a href="#confirm-delete-{{ reply.filename }}" id="delete-reply-{{ reply.filename }}" class="delete" role="button" aria-label="{{ gettext('Delete this reply') }}">
<span>{{ gettext('Delete') }}</span>
</a>
<dialog open id="confirm-delete-{{ reply.filename }}" class="confirm-prompt" aria-labelledby="delete-heading-{{ reply.filename }}">
<h3 id="delete-heading-{{ reply.filename }}" hidden>Delete reply from {{ reply.date|rel_datetime_format(relative=True) }}?</h3>
<p>{{ gettext('Delete this reply?') }}
<a href="#delete">{{ gettext('Cancel') }}</a>
<button type="submit" class="danger" id="confirm-delete-reply-button-{{ reply.filename }}" aria-label="{{ gettext('Delete') }}>{{ gettext('DELETE') }}</button>
<a href="#delete" role="button">{{ gettext('Cancel') }}</a>
<button type="submit" class="danger" id="confirm-delete-reply-button-{{ reply.filename }}" role="button" aria-label="{{ gettext('Delete') }}>{{ gettext('DELETE') }}</button>
</p>
</dialog>
</form>
<blockquote>{{ reply.decrypted | nl2br }}</blockquote>
</article>
{% endfor %}
<form id="delete-all" method="post" action="{{ url_for('main.batch_delete') }}">
<a class="btn danger" href="#delete-all-confirm" aria-label="{{ gettext('Delete All Replies') }}">{{ gettext('DELETE ALL REPLIES') }}</a>
<a class="btn danger" href="#delete-all-confirm" role="button" aria-label="{{ gettext('Delete All Replies') }}">{{ gettext('DELETE ALL REPLIES') }}</a>
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<dialog open id="delete-all-confirm" class="hidden-prompt" aria-labelledby="delete-all-heading">
<h3 id="delete-all-heading">{{ gettext('Are you finished with the replies?') }}</h3>
<button class="danger" type="submit">{{ gettext('YES, DELETE ALL REPLIES') }}</button>
<a class="btn" href="#delete-all">{{ gettext('NO, NOT YET') }}</a>
<a class="btn" role="button" href="#delete-all">{{ gettext('NO, NOT YET') }}</a>
</dialog>
</form>
{% else %}
Expand Down

0 comments on commit 753da75

Please sign in to comment.