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

Make Front of House Icons and Tables Accessible #4215 #4492

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions src/themes/OLH/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ <h1 class="menu-text">{{ request.journal.name }}</h1>
</div>
<div data-responsive-toggle="search-menu" data-hide-for="medium">
<a href="#" class="search-toggle" data-toggle>
<i class="fa fa-search"></i>
<i aria-hidden="true" class="fa fa-search"></i>
<span class="sr-only">{% trans 'Search' %}</span>
</a>
</div>
</div>
Expand Down Expand Up @@ -150,7 +151,7 @@ <h1 class="menu-text">{{ request.journal.name }}</h1>
<form method="POST" action="{% url 'search' %}">
{% csrf_token %}
<div class="input-group">
<span class="input-group-label"><i class="fa fa-search"></i></span>
<span class="input-group-label"><i aria-hidden="true" class="fa fa-search"></i></span>
<input class="input-group-field" type="search" name="article_search" placeholder="{% trans 'Search' %}">
<input type="hidden" name="sort" value="title">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<input id="sort" name="sort" type="hidden" value="relevance">
<input id="title" name="title" type="hidden" value="on">
<input id="abstract" name="abstract" type="hidden" value="on">
<span class="input-group-label"><span class="fa fa-search"></span></span>
<span class="input-group-label">
<i aria-hidden="true" class="fa fa-search"></i>
<span class="sr-only">{% trans 'Search' %}</span>
</span>
<input name="article_search" class="input-group-field" type="text">
<div class="input-group-button">
<input type="submit" class="button" value="Search">
Expand Down
17 changes: 15 additions & 2 deletions src/themes/OLH/templates/core/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,21 @@
{% if request.journal.nav_sub and not journal_settings.general.disable_journal_submission %}<li><a href="{% url 'journal_submissions' %}">{% trans 'Submission' %}</a></li>{% endif %}
{% if request.journal.nav_contact %}<li><a href="{% url 'contact' %}">{% trans 'Contact' %}</a></li>{% endif %}
{% hook 'nav_block' %}
{% if request.journal.nav_start and not journal_settings.general.disable_journal_submission %}<li><a href="{% url 'submission_start' %}" class="button"><i class="fa fa-cloud-upload"></i> {% trans 'Start Submission' %}</a></li>{% endif %}
{% if request.journal.nav_review %}<li><a href="{% url 'become_reviewer' %}" class="button"><i class="fa fa-trophy"></i> {% trans 'Become a Reviewer' %}</a></li>{% endif %}
{% if request.journal.nav_start and not journal_settings.general.disable_journal_submission %}
<li>
<a href="{% url 'submission_start' %}" class="button">
<i aria-hidden="true" class="fa fa-cloud-upload"></i> {% trans 'Start Submission' %}
</a>
</li>
{% endif %}
{% if request.journal.nav_review %}
<li>
<a href="{% url 'become_reviewer' %}" class="button">
<i aria-hidden="true" class="fa fa-trophy"></i>
{% trans 'Become a Reviewer' %}
</a>
</li>
{% endif %}

<li class=".is-dropdown-submenu-parent show-for-small-only">
<a href="#" data-options="is_hover:true; hover_timeout:5000">{% trans 'Account' %}</a>
Expand Down
2 changes: 1 addition & 1 deletion src/themes/OLH/templates/core/news/item.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h6>{{ news_item.byline }} on {{ news_item.posted|date:"Y-m-d" }}</h6>
{{ news_item.body|safe }}
</div>
<div class="large-3 columns">
<h7>{% trans 'Tags ' %}<i class="fa fa-tags">&nbsp;</i></h7>
<h7>{% trans 'Tags ' %}<i aria-hidden="true" class="fa fa-tags">&nbsp;</i></h7>
<p>{% for tag in news_item.tags.all %}<a href="{% url 'core_news_list_tag' tag.text %}" class="button success tiny">{{ tag.text }}</a>{% if not forloop.last %}&nbsp;{% endif %}{% endfor %}</p>
</div>
</div>
Expand Down
25 changes: 18 additions & 7 deletions src/themes/OLH/templates/elements/journal/box_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,30 @@
{% endif %}
<div class="{% if not journal_settings.article.disable_article_thumbnails %}large-10{% endif %} columns end">
{% if article.pinned %}
<i class="float-right fa fa-thumb-tack"></i>
<i aria-hidden="true" class="float-right fa fa-thumb-tack"></i>
<span class="sr-only">{% trans 'Pinned' %}</span>
{% endif %}
<h2>{{ article.title|safe }}{% if article.is_remote %}&nbsp;<i class="fa fa-external-link small-icon-text"></i>{% endif %}</h2>
<h2>{{ article.title|safe }}
{% if article.is_remote %}
&nbsp;<i aria-hidden="true" class="fa fa-external-link small-icon-text"></i>
<span class="sr-only">, {% trans 'externally hosted article' %}.</span>
{% endif %}
</h2>
{% include "elements/journal/authors_block.html" %}
<p><span class="date"><i
class="fa fa-calendar"></i> {{ article.date_published|date:"Y-m-d" }}</span> <i
class="fa fa-book"></i> {% if article.issue.issue_type.code == 'issue' %}{{ article.issue_title }}{% else %}{{ article.issue.issue_title }}{% endif %}</p>
<p>
<span class="date">
<i aria-hidden="true" class="fa fa-calendar"></i>
<time datetime='{{ article.date_published|date:"Y-m-d" }}'>
<span role="time">{{ article.date_published|date:"Y-m-d" }}</span>
</time>
</span>
<i aria-hidden="true" class="fa fa-book"></i> {% if article.issue.issue_type.code == 'issue' %}{{ article.issue_title }}{% else %}{{ article.issue.issue_title }}{% endif %}</p>
{% if article.issues.count > 1 %}
<p><strong><i class="fa fa-info-circle"></i> {% trans 'Also a part of:'%}</strong></p>
<p><strong><i aria-hidden="true" class="fa fa-info-circle"></i> {% trans 'Also a part of:'%}</strong></p>
{% for other in article.issues.all %}
{% if other != article.issue %}
<p>
<i class="fa fa-book"></i>
<i aria-hidden="true" class="fa fa-book"></i>
<a class="issue-link" href="{{ other.url }}">
{{other.issue_type.pretty_name}}: {{ other.display_title }}
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,48 @@
{% if user.website or user.twitter or user.facebook or user.github or user.linkedin %}
<p><small>
{% if user.website %}<a href="{{ user.website }}" aria-label="{{ member.user.full_name }}'s website" ><span class="fa fa-globe"></span> {% trans 'Website' %}</a>{% endif %}
{% if user.twitter %}<a href="https://www.twitter.com/{{ user.twitter }}" aria-label="{{ member.user.full_name }}'s twitter profile"><span class="fa fa-twitter-square"></span> {% trans 'Twitter' %}</a>{% endif %}
{% if user.facebook %}<a href="https://www.facebook.com/{{ user.facebook }}" aria-label="{{ member.user.full_name }}'s facebook profile"><span class="fa fa-facebook-square"></span> {% trans 'Facebook' %}</a>{% endif %}
{% if user.github %}<a href="https://www.github.com/{{ user.github}}" aria-label="{{ member.user.full_name }}'s github profile"><span class="fa fa-github-square"></span> {% trans 'Github' %}</a>{% endif %}
{% if user.linkedin %}<a href="https://www.linkedin.com/in/{{ user.linkedin }}" aria-label="{{ member.user.full_name }}'s linkedin profile"><span class="fa fa-linkedin-square"></span> {% trans 'Linkedin' %}</a>{% endif %}
{% if user.website %}
<a href="{{ user.website }}"
aria-label="{{ member.user.full_name }}'s website"
>
<i aria-hidden="true" class="fa fa-globe"></i>
{% trans 'Website' %}
</a>
{% endif %}

{% if user.twitter %}
<a href="https://www.twitter.com/{{ user.twitter }}"
aria-label="{{ member.user.full_name }}'s twitter profile"
>
<i aria-hidden="true" class="fa fa-twitter-square"></i>
{% trans 'Twitter' %}
</a>
{% endif %}

{% if user.facebook %}
<a href="https://www.facebook.com/{{ user.facebook }}"
aria-label="{{ member.user.full_name }}'s facebook profile"
>
<i aria-hidden="true" class="fa fa-facebook-square"></i>
{% trans 'Facebook' %}
</a>
{% endif %}

{% if user.github %}
<a href="https://www.github.com/{{ user.github}}"
aria-label="{{ member.user.full_name }}'s github profile"
>
<i aria-hidden="true" class="fa fa-github-square"></i>
{% trans 'Github' %}
</a>
{% endif %}

{% if user.linkedin %}
<a href="https://www.linkedin.com/in/{{ user.linkedin }}"
aria-label="{{ member.user.full_name }}'s linkedin profile"
>
<i aria-hidden="true" class="fa fa-linkedin-square"></i>
{% trans 'Linkedin' %}
</a>
{% endif %}
</small></p>
{% endif %}
7 changes: 6 additions & 1 deletion src/themes/OLH/templates/elements/journal/issue_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
<div class="section">
{% if issue.galley %}
<h3>{% trans 'Downloads' %}</h3>
<p><a href="{% url 'journal_issue_download_galley' issue.pk issue.galley.pk %}"><i class="fa fa-download">&nbsp</i>{% trans "Download Issue" %} (PDF)</a></p>
<p>
<a href="{% url 'journal_issue_download_galley' issue.pk issue.galley.pk %}">
<i aria-hidden="true" class="fa fa-download">&nbsp</i>
{% trans "Download Issue" %} (PDF)
</a>
</p>
{% endif %}
<h3>
{% if issue.issue_type.code == 'issue' %}{% trans "Issue Archive" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
data-equalizer-watch>
<p><small><a href="{% url 'repository_preprint' preprint.pk %}">{{ preprint.title|safe }}</a></small></p>
<p><small><i>{% for author in preprint.authors.all %}{{ author.full_name }}{% if not forloop.last %}, {% endif %}{% endfor %}</i></small></p>
<p><small><i class="fa fa-calendar">&nbsp;</i>{{ preprint.date_published|date:"Y-m-d" }}</small></p>
<p><small>
<i aria-hidden="true" class="fa fa-calendar">&nbsp;</i>
<time datetime='{{ preprint.date_published|date:"Y-m-d" }}'>
<span role="time">{{ preprint.date_published|date:"Y-m-d" }}</span>
</time>
</small></p>
</div>
</div>
{% if forloop.counter|divisibleby:3 %}
Expand Down
2 changes: 1 addition & 1 deletion src/themes/OLH/templates/elements/public_reviews.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
data-animation-out="slide-out-down">
<div class="card">
<div class="card-divider">
<h4><i class="fa fa-pencil">&nbsp;</i>Open peer review from {{ review.reviewer.full_name }}
<h4><i aria-hidden="true" class="fa fa-pencil">&nbsp;</i>Open peer review from {{ review.reviewer.full_name }}
</h4>
</div>
<div class="card-section">
Expand Down
38 changes: 17 additions & 21 deletions src/themes/OLH/templates/elements/section_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,45 @@ <h3>{% trans 'Sections' %}</h3>
<table>
<thead>
<tr>
<th>
<p>{% trans "Section or article type" %}</p>
</th>
<th>
<p>{% trans "Public Submissions" %}</p>
</th>
<th>
<p>{% trans "Peer Reviewed" %}</p>
</th>
<th>
<p>{% trans "Indexed" %}</p>
</th>
<th scope="col" >{% trans "Section or article type" %}</th>
<th scope="col" >{% trans "Public Submissions" %}</th>
<th scope="col" >{% trans "Peer Reviewed" %}</th>
<th scope="col" >{% trans "Indexed" %}</th>
</thead>
<tbody>
{% for section in sections %}
<tr>
<td>
<p>{{ section.name }}</p>
</td>
<th scope="row" >{{ section.name }}</th>
<td>
<strong>
{% if section.public_submissions %}
<i class="fa fa-check" title="{% trans 'yes' %}"></i>
<i aria-hidden="true" class="fa fa-check"></i>
<span class="sr-only">{% trans 'Yes' %}</span>
{% else %}
<i class="fa fa-times" title="{% trans 'no' %}"></i>
<i aria-hidden="true" class="fa fa-times"></i>
<span class="sr-only">{% trans 'No' %}</span>
{% endif %}
</strong>
</td>
<td>
<strong>
{% if section.number_of_reviewers > 0 %}
<i class="fa fa-check" title="{% trans 'yes' %}"></i>
<i aria-hidden="true" class="fa fa-check"></i>
<span class="sr-only">{% trans 'Yes' %}</span>
{% else %}
<i class="fa fa-times" title="{% trans 'no' %}"></i>
<i aria-hidden="true" class="fa fa-times"></i>
<span class="sr-only">{% trans 'No' %}</span>
{% endif %}
</strong>
</td>
<td>
<strong>
{% if section.indexing %}
<i class="fa fa-check" title="{% trans 'yes' %}"></i>
<i aria-hidden="true" class="fa fa-check"></i>
<span class="sr-only">{% trans 'Yes' %}</span>
{% else %}
<i class="fa fa-times" title="{% trans 'no' %}"></i>
<i aria-hidden="true" class="fa fa-times"></i>
<span class="sr-only">{% trans 'No' %}</span>
{% endif %}
</strong>
</td>
Expand Down
8 changes: 4 additions & 4 deletions src/themes/OLH/templates/elements/submit/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
data-animation-out="slide-out-down">
<div class="card">
<div class="card-divider">
<h4><i class="fa fa-user">&nbsp;</i>{% trans "Add New Author" %}</h4>
<h4><i aria-hidden="true" class="fa fa-user">&nbsp;</i>{% trans "Add New Author" %}</h4>
</div>
<div class="card-section">
<button class="close-button" data-close aria-label="Close reveal" type="button">
Expand Down Expand Up @@ -59,9 +59,9 @@ <h4><i class="fa fa-user">&nbsp;</i>{% trans "Add New Author" %}</h4>
{{ form.email|foundation }}
</div>
</div>

<button class="success button pull-right" type="submit" name="add_author"><i class="fa fa-user">
&nbsp;</i>{% trans "Add Author" %}
<button class="success button pull-right" type="submit" name="add_author">
<i aria-hidden="true" class="fa fa-user"> &nbsp;</i>
{% trans "Add Author" %}
</button>
</form>
</div>
Expand Down
Loading