diff --git a/cms/sass/components/_skip-to-main-content.scss b/cms/sass/components/_skip-to-main-content.scss new file mode 100644 index 0000000000..3542adb62c --- /dev/null +++ b/cms/sass/components/_skip-to-main-content.scss @@ -0,0 +1,35 @@ +/* Back to main content button */ + +.skip-to-main { + position: absolute; + z-index: 10000; + display: flex; + flex-direction: row; + align-items: center; + min-width: min-content; + padding: 5px; + top: 10px; + left: 10px; + background-color: $grapefruit; + + svg { + display: block; + margin: 0 auto; + stroke: $warm-black; + margin-rigth: 10px; + } + &:hover, &:focus { + svg { + margin-right: 10px; + } + } + &:hover:after, &:focus:after { + content: " Skip to main content"; + color: $warm-black; + vertical-align: bottom; + -webkit-font-feature-settings: 'liga' 1; + -moz-font-feature-settings: 'liga' 1; + font-feature-settings: 'liga' 1; + transition: 0.5 smooth; + } +} \ No newline at end of file diff --git a/cms/sass/main.scss b/cms/sass/main.scss index cdd22133b8..17ec6552f5 100644 --- a/cms/sass/main.scss +++ b/cms/sass/main.scss @@ -52,6 +52,7 @@ "components/review-table", "components/select2", "components/search-results", + "components/skip-to-main-content", "components/stat", "components/stretch-list", "components/tabs", diff --git a/doajtest/testbook/public_site/home_page.yml b/doajtest/testbook/public_site/home_page.yml index c2261786cc..625df716f7 100644 --- a/doajtest/testbook/public_site/home_page.yml +++ b/doajtest/testbook/public_site/home_page.yml @@ -120,3 +120,22 @@ tests: bottom right-hand corner. results: - You are returned to the top of the home page +- title: Skip to main content button (Accessibility) + context: + role: anonymous + steps: + - step: Refresh the page + - step: Click tab key on the keyboard once + results: + - Skip to the main content button is unfolded and focused + - step: Click enter + results: + - Focus is moved to the main content + - step: Turn on screen reader + - step: With the keyboard navigate to Skip to main content button + results: + - Screen reader reads the button title + - step: Click enter + results: + - Focus is moved to the main content + diff --git a/portality/templates/account/forgot.html b/portality/templates/account/forgot.html index 241525adfd..d8f5e9c837 100644 --- a/portality/templates/account/forgot.html +++ b/portality/templates/account/forgot.html @@ -3,7 +3,7 @@ {% block page_title %}Reset your password{% endblock %} {% block content %} -
+
@@ -23,5 +23,5 @@

Reset your password

-
+ {% endblock %} diff --git a/portality/templates/account/login.html b/portality/templates/account/login.html index 247149641a..726831e9e3 100644 --- a/portality/templates/account/login.html +++ b/portality/templates/account/login.html @@ -3,7 +3,7 @@ {% block page_title %}Login to your account{% endblock %} {% block content %} -
+
@@ -17,5 +17,5 @@

Login

-
+ {% endblock %} diff --git a/portality/templates/account/login_to_apply.html b/portality/templates/account/login_to_apply.html index 5d9ee3e8ed..556fbb71cb 100644 --- a/portality/templates/account/login_to_apply.html +++ b/portality/templates/account/login_to_apply.html @@ -3,7 +3,7 @@ {% block page_title %}Login to apply{% endblock %} {% block content %} -
+
@@ -46,5 +46,5 @@

Related help

-
+ {% endblock %} diff --git a/portality/templates/account/register.html b/portality/templates/account/register.html index 4f91d8250a..a497bd396a 100644 --- a/portality/templates/account/register.html +++ b/portality/templates/account/register.html @@ -12,7 +12,7 @@ {% endblock %} {% block content %} -
+
@@ -30,7 +30,7 @@

Register

-
+ {% endblock %} {% block extra_js_bottom %} diff --git a/portality/templates/account/reset.html b/portality/templates/account/reset.html index 2b459de104..fdacc27620 100644 --- a/portality/templates/account/reset.html +++ b/portality/templates/account/reset.html @@ -4,7 +4,7 @@ {% block content %} -
+
@@ -20,6 +20,6 @@

Hi {{ account.name or account.email }}

-
+ {% endblock %} diff --git a/portality/templates/api/current/api_docs.html b/portality/templates/api/current/api_docs.html index 9c5a2bc8e5..42d3d14588 100644 --- a/portality/templates/api/current/api_docs.html +++ b/portality/templates/api/current/api_docs.html @@ -14,7 +14,7 @@ {% endblock %} {% block content %} -
+
{# todo: this nav was bumping into swagger @@ -58,7 +58,7 @@

API

-
+ {% endblock %} {% block extra_js_bottom %} diff --git a/portality/templates/application_form/public_application.html b/portality/templates/application_form/public_application.html index af0e05d63e..31439b94d3 100644 --- a/portality/templates/application_form/public_application.html +++ b/portality/templates/application_form/public_application.html @@ -23,7 +23,7 @@ {% block content scoped %} -
+
{% include "application_form/_backend_validation.html" %}
@@ -64,7 +64,7 @@
-
+ {% endblock %} diff --git a/portality/templates/application_form/readonly_journal.html b/portality/templates/application_form/readonly_journal.html index 2fed49db61..fe429eea08 100644 --- a/portality/templates/application_form/readonly_journal.html +++ b/portality/templates/application_form/readonly_journal.html @@ -20,7 +20,7 @@ {% block content scoped %} -
+
@@ -47,7 +47,7 @@
-
+ {% endblock %} diff --git a/portality/templates/doaj/article.html b/portality/templates/doaj/article.html index 67720a8585..91f3f80200 100644 --- a/portality/templates/doaj/article.html +++ b/portality/templates/doaj/article.html @@ -67,7 +67,7 @@ {% set doi = bibjson.get_one_identifier("doi") %} {% set normalised_doi = article.get_normalised_doi() %} -
+

@@ -224,5 +224,5 @@

Published in {{jtitle}}

-
+ {% endblock %} diff --git a/portality/templates/doaj/articles_search.html b/portality/templates/doaj/articles_search.html index cea8977897..4a518fb3ae 100644 --- a/portality/templates/doaj/articles_search.html +++ b/portality/templates/doaj/articles_search.html @@ -10,10 +10,10 @@ {%- block meta_twitter_description -%}Find open access articles in DOAJ.{%- endblock -%} {% block content %} -
+
{% include "includes/search-help-modal.html" %} -
+ {% endblock %} {% block extra_js_bottom %} diff --git a/portality/templates/doaj/contact.html b/portality/templates/doaj/contact.html index 2a4739dec8..2ffb86985f 100644 --- a/portality/templates/doaj/contact.html +++ b/portality/templates/doaj/contact.html @@ -1,7 +1,7 @@ {% extends "layouts/public_base.html" %} {% block content %} -
+

Submit your feedback and questions here. Feedback submitted about a particular journal is treated as confidential.

@@ -52,7 +52,7 @@
-
+ {% endblock %} diff --git a/portality/templates/doaj/index.html b/portality/templates/doaj/index.html index 02bb78b878..f24f55571b 100644 --- a/portality/templates/doaj/index.html +++ b/portality/templates/doaj/index.html @@ -74,7 +74,7 @@

DOAJ in numbers

{% endblock %} {% block content %} -
+
@@ -246,6 +246,6 @@

Recently-added journals

-
+ {% endblock %} diff --git a/portality/templates/doaj/journals_search.html b/portality/templates/doaj/journals_search.html index e38bedd18e..8eef0d2c63 100644 --- a/portality/templates/doaj/journals_search.html +++ b/portality/templates/doaj/journals_search.html @@ -10,10 +10,10 @@ {%- block meta_twitter_description -%}Find open access journals in DOAJ.{%- endblock -%} {% block content %} -
+
{% include "includes/search-help-modal.html" %} -
+ {% endblock %} {% block extra_js_bottom %} diff --git a/portality/templates/doaj/toc.html b/portality/templates/doaj/toc.html index 276d9392be..adcb4c5ad9 100644 --- a/portality/templates/doaj/toc.html +++ b/portality/templates/doaj/toc.html @@ -42,7 +42,7 @@ } %} -
+
{% if journal.last_manually_updated_since(days=30) %} @@ -450,7 +450,7 @@

Journal metadata

-
+ {% include "includes/_hotjar.html" %} {% endblock %} diff --git a/portality/templates/editor/editor_base.html b/portality/templates/editor/editor_base.html index 1fc7bfbc81..c116f3d622 100644 --- a/portality/templates/editor/editor_base.html +++ b/portality/templates/editor/editor_base.html @@ -9,10 +9,15 @@ {% endblock %} {% block content %} -
- {% block editor_content %} - {% endblock %} -
+
+

Editor dashboard

+ {% include 'editor/nav.html' %} + +
+ {% block editor_content %} + {% endblock %} +
+
{% include "includes/_hotjar.html" %} {% endblock %} diff --git a/portality/templates/layouts/public_base.html b/portality/templates/layouts/public_base.html index 2e4cad9ddc..f6bdcf2b4d 100644 --- a/portality/templates/layouts/public_base.html +++ b/portality/templates/layouts/public_base.html @@ -2,6 +2,7 @@ {% block base_content %} +