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

Fixed skip link having no target when Banner is not on the page. #397

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions components/04-templates/page/__snapshots__/page.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ exports[`Page Component renders all blocks with complex attributes and classes 1
/>



<strong>
Banner Content
</strong>



<div
class="container"
Expand Down Expand Up @@ -658,9 +658,14 @@ exports[`Page Component renders content block with permutations: {
/>



<a
id="main-content"
tabindex="-1"
/>







Expand Down Expand Up @@ -821,9 +826,14 @@ exports[`Page Component renders content block with permutations: {
/>



<a
id="main-content"
tabindex="-1"
/>







Expand Down Expand Up @@ -970,9 +980,14 @@ exports[`Page Component renders content block with permutations: {
/>



<a
id="main-content"
tabindex="-1"
/>







Expand Down Expand Up @@ -1119,9 +1134,14 @@ exports[`Page Component renders content block with permutations: {
/>



<a
id="main-content"
tabindex="-1"
/>







Expand Down Expand Up @@ -1247,9 +1267,14 @@ exports[`Page Component renders with custom theme and attributes 1`] = `
/>



<a
id="main-content"
tabindex="-1"
/>







Expand Down Expand Up @@ -1344,9 +1369,14 @@ exports[`Page Component renders with default values 1`] = `
/>



<a
id="main-content"
tabindex="-1"
/>







Expand Down Expand Up @@ -1442,9 +1472,14 @@ exports[`Page Component strips HTML tags from attributes 1`] = `
/>



<a
id="main-content"
tabindex="-1"
/>







Expand Down
6 changes: 5 additions & 1 deletion components/04-templates/page/page.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
<a id="banner"></a>

{% block banner %}
{{ banner|raw }}
{% if banner is not empty %}
{{ banner|raw }}
{% else %}
<a id="main-content" tabindex="-1"></a>
{% endif %}
{% endblock %}

{% if highlighted is not empty %}
Expand Down