@companieshouse/ch-node-utils 1.3.22 → 1.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -124,6 +124,6 @@ The navbar also requires the use of styles provided in the [ch.gov.uk.css](https
124
124
 
125
125
  `<link href="{{ cdnHost }}/stylesheets/ch.gov.uk.css" rel="stylesheet"/>`
126
126
 
127
- It also requires the [navbar.js](https://github.com/companieshouse/cdn.ch.gov.uk/blob/master/app/assets/javascripts/lib/navbar.js) script to be added to the footer to make the navbar work in mobile mode
127
+ It also requires the [navbar.js](https://github.com/companieshouse/cdn.ch.gov.uk/blob/master/app/assets/javascripts/lib/navbar.js) script to be added to the footer to make the navbar work in mobile mode (make sure it's the latest version).
128
128
 
129
129
  `<script src="{{ cdnHost }}/javascripts/lib/navbar.js"></script>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companieshouse/ch-node-utils",
3
- "version": "1.3.22",
3
+ "version": "1.3.23",
4
4
  "author": "companieshouse",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -32,7 +32,8 @@ It receives:
32
32
  <div class="js-toggle-nav" id="global-nav">
33
33
  <nav role="navigation" class="content" aria-label="{{ lang.mainNavbar }}">
34
34
  {% if userDisplayText %}
35
- <a href="#navigation" class="js-header-toggle menu">{{ userDisplayText }}
35
+ <a href="#navigation" role="button" aria-expanded="false" class="js-header-toggle menu">
36
+ {{ userDisplayText }}
36
37
  <span class="govuk-visually-hidden">{{ lang.clickToExpandOrCollapse }}</span>
37
38
  </a>
38
39
  {% else %}
@@ -65,7 +66,7 @@ It receives:
65
66
  - pageLanguage: the language code for the page (e.g. 'en', 'cy')
66
67
  - accountUrl: base URL to account service - ACCOUNT_URL
67
68
  #}
68
- {% macro addPredefinedNavbar(userDisplayText, chsMonitorGuiUrl, lang, displayAuthorisedAgent, displayYourCompanies, displayUserManagementAdmin, pageLanguage="en", accountUrl) %}
69
+ {% macro addPredefinedNavbar(userDisplayText, chsMonitorGuiUrl, lang, displayAuthorisedAgent, displayYourCompanies, displayUserManagementAdmin, pageLanguage = "en", accountUrl) %}
69
70
  {% set menuItems = [
70
71
  { id: "user-management-admin", href: "/identity-verification?lang=" + pageLanguage, displayText: lang.userManagementAdmin or "User management admin" } if displayUserManagementAdmin === "yes",
71
72
  { id: "authorised-agent", href: "/authorised-agent?lang=" + pageLanguage, displayText: lang.authorisedAgent or "Authorised agent" } if displayAuthorisedAgent === "yes",