Skip to content

Commit e98f7f5

Browse files
committed
a11y: #4232 restructure headings
1 parent 9a8d6ad commit e98f7f5

File tree

93 files changed

+361
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+361
-298
lines changed

src/themes/OLH/assets/scss/app.scss

+17
Original file line numberDiff line numberDiff line change
@@ -1335,3 +1335,20 @@ button.list-group-item-danger.active:focus {
13351335
text-decoration: underline;
13361336
}
13371337

1338+
.byline{
1339+
font-size: 1.11111rem;
1340+
font-family: "Proxima Nova", Montserrat, Helvetica, Roboto, Arial, sans-serif;
1341+
font-weight: 300;
1342+
font-style: normal;
1343+
color: inherit;
1344+
text-rendering: optimizeLegibility;
1345+
margin-top: 0;
1346+
margin-bottom: 0.5rem;
1347+
line-height: 1.4;
1348+
}
1349+
1350+
.profile-name{
1351+
font-family: "Merriweather", serif;
1352+
font-size: 98%;
1353+
font-weight: bold;
1354+
}

src/themes/OLH/templates/core/accounts/activate_account.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
<div class="medium-12 medium-centered large-12 large-centered columns login">
2424

2525
{% if account %}
26-
{# HeadingA11y #} <h4>{% trans "Activate Account" %}</h4>
26+
<h4>{% trans "Activate Account" %}</h4>
2727
<form method="POST">
2828
{% csrf_token %}
2929
<p>{% trans "You can complete the activation process by clicking the button below." %}</p>
3030
<button class="button" name="activate">{% trans "Activate Account" %}</button>
3131
</form>
3232
{% else %}
33-
{# HeadingA11y #} <h4>{% trans "Error" %}</h4>
33+
<h4>{% trans "Error" %}</h4>
3434
<p>
3535
{% trans "There was no inactive account with this activation code found. It is possible that your account is already active, you can check by attempting to" %}
3636
<a href="{% url 'core_login' %}">{% trans "login" %}</a>.

src/themes/OLH/templates/core/accounts/get_reset_token.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{% csrf_token %}
2727
<div class="callout">
2828
<div class="row column log-in-form">
29-
{# HeadingA11y #} <h5>{% trans "Enter your email address to begin the reset process" %}:</h5>
29+
<h5>{% trans "Enter your email address to begin the reset process" %}:</h5>
3030
{{ form|foundation }}
3131
<p><button type="submit" class="button expanded">{% trans "Request Token" %}</button></p>
3232
</div>

src/themes/OLH/templates/core/accounts/orcid_registration.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{% block body %}
2121

2222
<div class="row">
23-
{# HeadingA11y #} <h5>{% trans "Unregistered ORCiD" %}</h5>
23+
<h5>{% trans "Unregistered ORCiD" %}</h5>
2424
<p>{% trans "The ORCiD you logged in with is not currently linked with an account in our system. You can either register a new account, or login with an existing account to link your ORCiD for future use." %}</p>
2525

2626
<div class="large-4 columns login">
@@ -29,7 +29,7 @@
2929
{% csrf_token %}
3030
<div class="callout">
3131
<div class="row column log-in-form">
32-
{# HeadingA11y #} <h5>{% trans "Login" %}</h5>
32+
<h5>{% trans "Login" %}</h5>
3333
<label>{% trans "Email" %}
3434
<input name="user_name" type="text" placeholder="[email protected]">
3535
</label>
@@ -49,7 +49,7 @@
4949

5050
<div class="callout">
5151
<div class="row column log-in-form">
52-
{# HeadingA11y #} <h5>{% trans "Register" %}</h5>
52+
<h5>{% trans "Register" %}</h5>
5353
<br />
5454
<a href="{% url 'core_register' %}?token={{ token.token }}" class="button expanded">{% trans "Register" %}</a>
5555
</div>

src/themes/OLH/templates/core/accounts/public_profile.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="row column">
1010
<div class="large-3 columns">
1111
{% include "common/elements/profile_image.html" with classes="thumbnail editorial-image" user=user %}
12-
{# HeadingA11y #} <h3>{{ user.full_name }}</h3>
12+
<h1>{{ user.full_name }}</h1>
1313
{% if roles %}
1414
<p>
1515
<strong>{% trans "Roles" %}: </strong><br>
@@ -42,13 +42,13 @@
4242
</div>
4343
<div class="large-9 columns">
4444
{% if user.biography %}
45-
{# HeadingA11y #} <h3>{% trans "Biography" %}</h3>
45+
<h2>{% trans "Biography" %}</h2>
4646
<hr />
4747
{{ user.biography|safe }}
4848
<br/><br/>
4949
{% endif %}
5050
{% if user.published_articles %}
51-
{# HeadingA11y #} <h3>{% trans "Publications" %}</h3>
51+
<h2>{% trans "Publications" %}</h2>
5252
<hr />
5353
{% for article in user.published_articles %}
5454
{% include "elements/journal/box_article.html" with article=article %}

src/themes/OLH/templates/core/accounts/register.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{% csrf_token %}
2727
<div class="callout">
2828
<div class="row column log-in-form">
29-
{# HeadingA11y #} <h5>{% trans "Register for an account with" %} {{ request.press.name }}.</h5>
29+
<h5>{% trans "Register for an account with" %} {{ request.press.name }}.</h5>
3030

3131
<p>{% trans "Password Rules" %}:</p>
3232
<ul class="no-top-margin">
@@ -107,7 +107,7 @@
107107
</div>
108108

109109
<div class="reveal" id="password-modal" data-reveal>
110-
{# HeadingA11y #} <h1>{% trans "Password Guide" %}</h1>
110+
<h1>{% trans "Password Guide" %}</h1>
111111
<p class="lead">{% trans "When it comes to passwords, length is better than complexity." %}</p>
112112
<p>{% trans "Its a common myth that a short and complex password (Jfjfy&65^87) is more secure than a long and uncomplicated password (our awesome moon base rocks)." %}</p>
113113
<p>{% trans "We recommend selecting a long, but easy to remember password such as our awesome moon base rocks which would take an estimated septillion years to crack as opposed to a complex one like Jfjfy&65^87 which would take just over 600 years on a standard computer." %}</p>

src/themes/OLH/templates/core/accounts/reset_password.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{% csrf_token %}
2828
<div class="callout">
2929
<div class="row column log-in-form">
30-
{# HeadingA11y #} <h5>{% trans "Enter your new password twice to complete the reset process" %}:</h5>
30+
<h5>{% trans "Enter your new password twice to complete the reset process" %}:</h5>
3131
<p>{% trans "Password Rules" %}:</p>
3232
<ul class="no-top-margin">
3333
{% include "common/elements/password_rules.html" %}
@@ -49,7 +49,7 @@
4949
</div>
5050

5151
<div class="reveal" id="password-modal" data-reveal>
52-
{# HeadingA11y #} <h1>{% trans "Password Guide" %}</h1>
52+
<h1>{% trans "Password Guide" %}</h1>
5353
<p class="lead">{% trans "When it comes to passwords, length is better than complexity." %}</p>
5454
<p>{% trans "Its a common myth that a short and complex password (Jfjfy&65^87) is more secure than a long and uncomplicated password (our awesome moon base rocks)." %}</p>
5555
<p>{% trans "We recommend selecting a long, but easy to remember password such as our awesome moon base rocks which would take an estimated septillion years to crack as opposed to a complex one like Jfjfy&65^87 which would take just over 600 years on a standard computer." %}</p>

src/themes/OLH/templates/core/login.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<div class="callout">
2929
<div class="row column log-in-form">
3030
{% if settings.ENABLE_ORCID %}
31-
{# HeadingA11y #} <h4 class="text-center">{% trans "Log in with your account" %}</h4>
31+
<h4 class="text-center">{% trans "Log in with your account" %}</h4>
3232
<a href="{{ settings.ORCID_URL }}?client_id={{ settings.ORCID_CLIENT_ID }}&response_type=code&scope=/authenticate&redirect_uri={% orcid_redirect_uri 'login' %}" class="button expanded orcid-button">{% trans "Log in with ORCiD" %}</a>
3333
{% endif %}
3434
{% if settings.ENABLE_OIDC %}

src/themes/OLH/templates/core/news/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{% block body %}
99
<section id="content" class="">
1010
<div class="row column ">
11-
{# HeadingA11y #} <h3 class="news-item-block">{{ journal_settings.news.news_title }}</h3>
12-
{% if tag %}{# HeadingA11y #} <h3>{% trans "Filtering tag" %}: {{ tag }}</h3>{% endif %}
11+
<h1 class="news-item-block">{{ journal_settings.news.news_title }}</h1>
12+
{% if tag %}<h2>{% trans "Filtering tag" %}: {{ tag }}</h2>{% endif %}
1313
{% for item in news_items %}
1414
<div class="news-item-block">
1515
<div class="row">
@@ -21,8 +21,8 @@
2121
</div>
2222
{% endif %}
2323
<div class="large-7 columns">
24-
{# HeadingA11y #} <h4>{{ item.title|safe }}</h4>
25-
{# HeadingA11y #} <h6>{{ item.byline }} {% trans "on" %} {{ item.posted|date:"Y-m-d" }}</h6>
24+
<h2>{{ item.title|safe }}</h2>
25+
<p class="byline">{{ item.byline }} {% trans "on" %} {{ item.posted|date:"Y-m-d" }}</p>
2626
<p>{{ item.body|truncatewords_html:50|safe}}</p>
2727
<a class="button" href="{% url 'core_news_item' item.pk %}">{% trans "Read More" %}</a>
2828
</div>
@@ -31,7 +31,7 @@
3131

3232
</div>
3333
{% empty %}
34-
{# HeadingA11y #} <h4>{% trans "This journal currently has no news items to display." %}</h4>
34+
<h2>{% trans "This journal currently has no news items to display." %}</h2>
3535
{% endfor %}
3636
</div>
3737
<div class="pagination-block">

src/themes/OLH/templates/core/news/item.html

+22-20
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,35 @@
1414
<div class="row column">
1515
{% if news_item.best_image_url %}
1616
<div class="orbit article-orbit" data-orbit>
17-
<ul class="orbit-container article-orbit">
18-
<li class="is-active orbit-slide overlay">
19-
<img class="orbit-image"
20-
src="{{ news_item.best_image_url }}"
21-
alt="{{ news_item.title|striptags|unescape }}">
22-
<div class="row column">
23-
<figcaption class="orbit-caption">
24-
{# HeadingA11y #} <h3>{{ news_item.title|safe }}</h3>
25-
<p>{{ news_item.byline }} {% trans "on" %} {{ news_item.posted|date:"Y-m-d" }}</p>
26-
</figcaption>
27-
</div>
28-
</li>
29-
</ul>
30-
</div>
17+
<ul class="orbit-container article-orbit">
18+
<li class="is-active orbit-slide overlay">
19+
<img class="orbit-image"
20+
src="{{ news_item.best_image_url }}"
21+
alt="{{ news_item.title|striptags|unescape }}">
22+
<div class="row column">
23+
<figcaption class="orbit-caption">
24+
<h1>{{ news_item.title|safe }}</h1>
25+
<p class="byline">{{ news_item.byline }} {% trans "on" %} {{ news_item.posted|date:"Y-m-d" }}</p>
26+
</figcaption>
27+
</div>
28+
</li>
29+
</ul>
30+
</div>
3131
<br />
3232
{% else %}
33-
{# HeadingA11y #} <h1>{{ news_item.title|safe }}</h1>
34-
{# HeadingA11y #} <h6>{{ news_item.byline }} on {{ news_item.posted|date:"Y-m-d" }}</h6>
33+
<h1>{{ news_item.title|safe }}</h1>
34+
<p class="byline">{{ news_item.byline }} on {{ news_item.posted|date:"Y-m-d" }}</p>
3535
{% endif %}
3636
<div class="row">
3737
<div class="large-9 columns">
3838
{{ news_item.body|safe }}
3939
</div>
40-
<div class="large-3 columns">
41-
{# HeadingA11y #} <h7>{% trans 'Tags ' %}<i aria-hidden="true" class="fa fa-tags">&nbsp;</i></h7>
42-
<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>
43-
</div>
40+
{% if news_item.tags.all %}
41+
<div class="large-3 columns">
42+
<h2>{% trans 'Tags ' %}<i aria-hidden="true" class="fa fa-tags">&nbsp;</i></h2>
43+
<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>
44+
</div>
45+
{% endif %}
4446
</div>
4547

4648
<br />

src/themes/OLH/templates/elements/journal/article_list_filters.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{% if facet_form.fields %}
55
<section aria-labelledby="filter-title" class="section">
6-
{# HeadingA11y #} <h3 id="filter-title">{% trans 'Filter' %}</h3>
6+
<h2 id="filter-title">{% trans 'Filter' %}</h2>
77
<form method="GET" id={{ facet_form.id }}>
88
{{ facet_form|foundation }}
99
<button action="" class="button" type="submit">{% trans 'Apply' %}</button>

src/themes/OLH/templates/elements/journal/box_article.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
<i aria-hidden="true" class="float-right fa fa-thumb-tack"></i>
2323
<span class="sr-only">{% trans 'Pinned' %}</span>
2424
{% endif %}
25-
<h3>{{ article.title|safe }}
25+
{# HeadingA11y Clash #} <h2>{{ article.title|safe }}
2626
{% if article.is_remote %}
2727
&nbsp;<i aria-hidden="true" class="fa fa-external-link small-icon-text"></i>
2828
<span class="sr-only">, {% trans 'externally hosted article' %}.</span>
2929
{% endif %}
30-
</h3>
30+
</h2>
3131
{% include "elements/journal/authors_block.html" %}
3232
<p>
3333
<span class="date">

src/themes/OLH/templates/elements/public_reviews.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
data-animation-out="slide-out-down">
55
<div class="card">
66
<div class="card-divider">
7-
{# HeadingA11y #} <h4><i aria-hidden="true" class="fa fa-pencil">&nbsp;</i>Open peer review from {{ review.reviewer.full_name }}
8-
</h4>
7+
<h2><i aria-hidden="true" class="fa fa-pencil">&nbsp;</i>Open peer review from {{ review.reviewer.full_name }}</h2>
98
</div>
109
<div class="card-section">
1110
{% for answer in review.review_form_answers %}

src/themes/OLH/templates/elements/section_block.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# HeadingA11y #} <h3>{% trans 'Sections' %}</h3>
1+
<h2>{% trans 'Sections' %}</h2>
22
<table>
33
<thead>
44
<tr>

src/themes/OLH/templates/journal/article_list.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</li>
2020
</ul>
2121
</aside>
22-
{# HeadingA11y #} <h1 id="articles-title">{% trans "Articles" %}</h1>
22+
<h1 id="articles-title">{% trans "Articles" %}</h1>
2323
<section aria-label="{% trans 'Results' %}">
2424
{% include "common/elements/sorting.html" with form_id=facet_form.id %}
2525
{% for article in article_list %}

src/themes/OLH/templates/journal/authors.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<section id="content">
99
<div class="row">
1010
<div class="large-12 columns">
11-
{# HeadingA11y #} <h1>{% trans 'Authors' %}</h1>
11+
<h1>{% trans 'Authors' %}</h1>
1212
</div>
1313
</div>
1414

@@ -28,7 +28,7 @@
2828

2929
{% endif %}
3030

31-
<strong>{{ author.full_name }}</strong><br/>
31+
<h2>{{ author.full_name }}</h2>
3232
<i>
3333
<small>{{ author.affiliation }}</small>
3434
</i>

src/themes/OLH/templates/journal/contact.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,25 @@
66

77
{% block body %}
88
<section id="content" class="no-padding">
9+
<h1 class="sr-only">{% trans 'Contact us' %}</h1>
910
<div class="row column">
1011
<div class="large-4 columns contact">
1112
{% if request.journal %}
12-
{# HeadingA11y #} <h4>{% trans "Journal Representatives" %}</h4>
13+
<h2>{% trans "Journal Representatives" %}</h2>
1314
{% else %}
14-
{# HeadingA11y #} <h4>{% trans "Press Representatives" %}</h4>
15+
<h2>{% trans "Press Representatives" %}</h2>
1516
{% endif %}
1617
{% for contact in contacts %}
17-
{# HeadingA11y #} <h5>{{ contact.name }}</h5>
18+
<h3>{{ contact.name }}</h3>
1819
<p>{{ contact.role }}</p>
1920
{% endfor %}
2021
{% if journal_settings.general.contact_info %}
21-
{# HeadingA11y #} <h4>{% trans 'Contact Information' %}</h4>
22+
<h2>{% trans 'Contact Information' %}</h2>
2223
{{ journal_settings.general.contact_info|safe }}
2324
{% endif %}
2425
</div>
2526
<div class="large-8 columns">
26-
{# HeadingA11y #} <h3>{% trans "Contact" %}</h3>
27+
<h2>{% trans "Contact" %}</h2>
2728
<form method="POST" novalidate>
2829
{% include "elements/forms/errors.html" with form=contact_form %}
2930
{% csrf_token %}

src/themes/OLH/templates/journal/editorial_team.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h1>{{ journal_settings.styling.editorial_group_page_name }}</h1>
2222
{% for group in editorial_groups %}
2323
{% if not journal_settings.styling.hide_editorial_group_names %}
2424
{% if not group_id %}
25-
{# HeadingA11y #} <h2>{{ group.name }}</h2>
25+
<h2>{{ group.name }}</h2>
2626
{% endif %}
2727
{% if group.description %}<p>{{ group.description|safe }}</p>{% endif %}
2828
{% endif %}
@@ -32,7 +32,7 @@ <h1>{{ journal_settings.styling.editorial_group_page_name }}</h1>
3232
<div class="{% if journal_settings.styling.enable_editorial_images %}editorial-team{% endif %} callout"
3333
data-equalizer-watch>
3434
{% include "common/elements/journal/editorial_team_image.html" with group=group classes="thumbnail editorial-image" %}
35-
<strong>{{ member.user.full_name }}</strong><br/>
35+
<h3 class="profile-name">{{ member.user.full_name }}</h3>
3636
<i>
3737
<small>{{ member.user.affiliation }}{% include "common/elements/journal/editorial_team_country.html" %}</small>
3838
</i><br/>

src/themes/OLH/templates/journal/full-text-search.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
{% block body %}
1313
<section id="content">
1414
{% if search_term %}
15-
{# HeadingA11y #} <h5>Searching for: <i>{{ search_term }}</i></h5>
15+
<h1>Searching for: <i>{{ search_term }}</i></h1>
1616
{% elif keyword %}
17-
{# HeadingA11y #} <h5>Keyword: <i>{{ keyword }}</i></h5>
17+
<h1>Keyword: <i>{{ keyword }}</i></h1>
18+
{% else %}
19+
<h1>{% trans 'All Articles' %}></h1>
1820
{% endif %}
1921

2022
<div class="row">

src/themes/OLH/templates/journal/keyword.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<section id="content">
1010
<div class="row">
1111
<div class="large-8 columns border-right">
12-
{# HeadingA11y #} <h1>{% trans "Keyword" %}: {{ keyword.word }}</h1>
12+
<h1>{% trans "Keyword" %}: {{ keyword.word }}</h1>
1313
<p>
1414
<small><a href="{% url 'keywords' %}">{% trans 'Back to Keywords List' %}</a></small>
1515
</p>

0 commit comments

Comments
 (0)