Skip to content

Commit

Permalink
Hide toggle link when JS disabled (related nav)
Browse files Browse the repository at this point in the history
When JS is disabled, we want to expand all content normally hidden behind a toggle, and hide the toggle link.
  • Loading branch information
Vanita Barrett committed Oct 3, 2018
1 parent 7accefb commit e85ac26
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,10 @@
useful summary for people upgrading their application, not a replication
of the commit log.

## Unreleased

* Fix toggle behaviour in related navigation and taxonomy navigation when JS disabled (PR #551)

## 11.1.0

* Add Admin analytics script (#555)
Expand Down
Expand Up @@ -36,6 +36,14 @@
}
}

.gem-c-related-navigation__toggle {
display: none;

.js-enabled & {
display: block;
}
}

.gem-c-related-navigation__section-link {
@include bold-16;
}
Expand Down
Expand Up @@ -44,6 +44,7 @@
<% if links.length > section_link_limit %>
<li class="gem-c-related-navigation__link toggle-wrap">
<a href="#"
class="gem-c-related-navigation__toggle"
data-controls="toggle_<%= section_title %>"
data-expanded="false"
data-toggled-text="<%= t("govuk_component.metadata.toggle_less", default: "Show fewer") %>">
Expand Down

0 comments on commit e85ac26

Please sign in to comment.