Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a11y #4244 keywords markup as lists #4559

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions src/themes/clean/templates/journal/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,21 @@ <h2>{% trans "Abstract" %}</h2>
<p>{{ article.abstract | safe }}</p>
{% endif %}
{% if article.keywords and article.keywords.count > 0 %}
<p><strong>{% trans "Keywords" %}:</strong>
{% for keyword in article.keywords.all %}
{% if journal_settings.general.keyword_list_page %}<a href="{% url 'keyword' keyword.pk %}">{% endif %}
{{ keyword.word }}{% if journal_settings.general.keyword_list_page %}</a>{% endif %}{% if not forloop.last %}, {% endif %}
{% endfor %}</p>
<h3>{% trans "Keywords" %}:</h3>
<ul class="list-inline">
{% for keyword in article.keywords.all %}
<li class="list-inline-item">
{% if journal_settings.general.keyword_list_page %}
<a href="{% url 'keyword' keyword.pk %}">
{% endif %}
<span aria-hidden=true>{{ keyword.word }}</span>
<span class="sr-only">{% trans 'Keyword:' %} {{ keyword.word }}</span>
{% if journal_settings.general.keyword_list_page %}
</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% if article.is_published or proofing %}
<p><strong>{% trans "How to Cite" %}:</strong>
Expand Down