Skip to content

Commit

Permalink
Adjust styling of PEP page (#1075)
Browse files Browse the repository at this point in the history
Prior to this change the text in the error message was bolded.

This change changes the bold error message to a normal weight error message.  It also adds, in the readme, a link to the page containing functional testing endpoints for all different error pages, so they can be tested.
Last but not least an accessibility improvement was included: the logo now has an empty alt text.

[Issue discovered as part of fixing tickets for the latest feedback round](https://wiki.surfnet.nl/display/coininfra/Bevindingen+nav+tests+door+supportteam)
  • Loading branch information
Koen Cornelis authored Feb 1, 2021
1 parent 492e156 commit 112fc85
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ Below you'll find a list of the "entry points" for each page with corresponding

- wayf: `templates > modules > authentication > view > proxy > wayf.html.twig `. You can use `https://engine.vm.openconext.org/functional-testing/wayf` to develop the page.
- error: `templates > modules > default > view > error > error.html.twig`. You can use `https://engine.vm.openconext.org/feedback/unknown-error` to develop the page.
There are a lot of error pages. To test all different kinds, you can use the urls on this page: `https://github.com/OpenConext/OpenConext-engineblock/blob/master/theme/cypress/visual-regression/ErrorPage.spec.js#L72`

- redirect page: `templates > modules > authentication > view > proxy > redirect.html.twig`.
- spinner page: `templates > modules > authentication > view > proxy > form.html.twig`. To test it disable the onload handler on the body-tag and go to your profile (or load the page without JS).
- index.html.twig: `templates > modules > authentication > view > index > index.html.twig`. You can use `https://engine.vm.openconext.org/` to develop the page.
Expand Down
8 changes: 8 additions & 0 deletions theme/base/stylesheets/pages/error-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ body {
}
}
}

.error-message--no-bold {
font-weight: normal;

.error-title__error-message--institution {
font-weight: $boldest;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
{% block pageHeading %}{{ pageTitle }}{% endblock %}

{% block errorMessage %}

<h2>{{ 'error_authorization_policy_violation_info'|trans|raw }}</h2>

{% if logo is not null %}
<img src="{{ logo.url }}?v={{ assetsVersion }}"
class="pull-right"
width="{{ logo.width }}"
height="{{ logo.height }}"
alt=""
>
{% endif %}

Expand All @@ -29,5 +29,7 @@

{% endblock %}

{% block errorMessageClass %}error-message--no-bold{% endblock %}

{# The PDP error page should not show the table with the feedback information and back button. #}
{% block feedbackInfo %}{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<main class="error-container__content">
<div class="error-title">
<h1 class="error-title__heading">{% block pageTitle %}{% endblock %}</h1>
<div class="error-title__error-message">{% block errorMessage %}{% endblock %}</div>
<div class="error-title__error-message {% block errorMessageClass %}{% endblock %}">{% block errorMessage %}{% endblock %}</div>
</div>

{# Some error pages omit the feedback info entirily. To ensure we do not show the intro text, check if the block is empty #}
Expand Down

0 comments on commit 112fc85

Please sign in to comment.