Skip to content

Commit e98f7f5

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

93 files changed

Lines changed: 361 additions & 298 deletions

File tree

Some content is hidden

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

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

Lines changed: 17 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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="somebody@example.com">
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 22 additions & 20 deletions
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 />

0 commit comments

Comments
 (0)