diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ccd3034c..b8312543a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,32 @@ :wrench: **Fixes** +- Remove the boolean `showNav`, `showSearch` and `transactional` options from the header component. Respective parts of the header are now shown if values for `primaryLinks`, `search` or `transactionalService` options are provided. Additionally, the `searchAction` option is renamed `search.action` and the `searchInputName` option is renamed `search.name`. Finally, the label, button and placeholder text for the search input can be updated using the new `search.visuallyHiddenLabel`, `search.visuallyHiddenButton` and `search.placeholder` options. ([PR 996](https://github.com/nhsuk/nhsuk-frontend/pull/996)) - Fix navigation items not flowing into the overflow drop-down menu on desktop ([PR 1062](https://github.com/nhsuk/nhsuk-frontend/pull/1062)) - Update header styles so that `.nhsuk-header__search-no-nav` class is no longer needed when header contains a search field but no navigation ([PR 1046](https://github.com/nhsuk/nhsuk-frontend/pull/1046)) - Update navigation list item padding to vertically align navigation items with width container ([PR 1033](https://github.com/nhsuk/nhsuk-frontend/pull/1033)) +:boom: **Breaking changes** + +- The NHS logo in the header has been updated so that it can have higher contrast when focused. ([PR 1047]([https://github.com/nhsuk/nhsuk-frontend/pull/1047])) + + Previously the logo used the following SVG: + + ```svg + + ``` + + This has been updated to use the following SVG: + + ```svg + + ``` + ## 9.0.1 - 9 October 2024 :wrench: **Fixes** diff --git a/app/_templates/page.njk b/app/_templates/page.njk index 082d1d0e5..20186d6ab 100644 --- a/app/_templates/page.njk +++ b/app/_templates/page.njk @@ -38,11 +38,8 @@ }) }} {{ header({ - "showNav": "false", - "showSearch": "false", "homeHref": baseUrl - }) - }} + }) }} {% endblock %} diff --git a/app/components/all.njk b/app/components/all.njk index 4155ce37a..07bf58089 100644 --- a/app/components/all.njk +++ b/app/components/all.njk @@ -36,8 +36,7 @@ }) }} {{ header({ - "showNav": "true", - "showSearch": "true", + "search": true, "primaryLinks": [ { "url" : "https://www.nhs.uk/conditions", diff --git a/app/components/header/header-logo.njk b/app/components/header/header-logo.njk index 800210b56..aa44f63fd 100644 --- a/app/components/header/header-logo.njk +++ b/app/components/header/header-logo.njk @@ -5,10 +5,6 @@ {% block body %} - {{ header({ - "showNav": "false", - "showSearch": "false" - }) - }} + {{ header() }} {% endblock %} diff --git a/app/components/header/header-navigation.njk b/app/components/header/header-navigation.njk index fb3652aa1..609ab5842 100644 --- a/app/components/header/header-navigation.njk +++ b/app/components/header/header-navigation.njk @@ -6,8 +6,6 @@ {% block body %} {{ header({ - "showNav": "true", - "showSearch": "false", "primaryLinks": [ { "url" : "https://www.nhs.uk/conditions", diff --git a/app/components/header/header-org-white-nav.njk b/app/components/header/header-org-white-nav.njk index c0d27af32..7c70723b5 100644 --- a/app/components/header/header-org-white-nav.njk +++ b/app/components/header/header-org-white-nav.njk @@ -6,8 +6,6 @@ {% block body %} {{ header({ - "showNav": "true", - "showSearch": "true", "classes": "nhsuk-header--white nhsuk-header--white-nav", "organisation": { "name": "Anytown Anyplace", @@ -35,7 +33,10 @@ 'url' : '#', 'label' : 'Our research' } - ] + ], + "search": { + "visuallyHiddenLabel": "Search the Anytown Anyplace Anywhere website" + } }) }} diff --git a/app/components/header/header-org-white.njk b/app/components/header/header-org-white.njk index 50c155ce0..e80591c12 100644 --- a/app/components/header/header-org-white.njk +++ b/app/components/header/header-org-white.njk @@ -6,8 +6,6 @@ {% block body %} {{ header({ - "showNav": "true", - "showSearch": "true", "classes": "nhsuk-header--white", "organisation": { "name": "Anytown Anyplace", @@ -35,7 +33,10 @@ 'url' : '#', 'label' : 'Our research' } - ] + ], + "search": { + "visuallyHiddenLabel": "Search the Anytown Anyplace Anywhere website" + } }) }} diff --git a/app/components/header/header-org.njk b/app/components/header/header-org.njk index 134cca172..125acaf40 100644 --- a/app/components/header/header-org.njk +++ b/app/components/header/header-org.njk @@ -6,8 +6,6 @@ {% block body %} {{ header({ - "showNav": "true", - "showSearch": "true", "organisation": { "name": "Anytown Anyplace", "split": "Anywhere", @@ -34,7 +32,10 @@ 'url' : '#', 'label' : 'Our research' } - ] + ], + "search": { + "visuallyHiddenLabel": "Search the Anytown Anyplace Anywhere website" + } }) }} diff --git a/app/components/header/header-search.njk b/app/components/header/header-search.njk index 3eace51f0..e8be4c320 100644 --- a/app/components/header/header-search.njk +++ b/app/components/header/header-search.njk @@ -6,35 +6,7 @@ {% block body %} {{ header({ - "showNav": "false", - "showSearch": "true", - "primaryLinks": [ - { - "url" : "https://www.nhs.uk/conditions", - "label" : "Health A-Z" - }, - { - 'url' : 'https://www.nhs.uk/live-well/', - 'label' : 'Live Well' - }, - { - 'url' : 'https://www.nhs.uk/mental-health/', - 'label' : 'Mental health' - }, - { - 'url' : 'https://www.nhs.uk/conditions/social-care-and-support/', - 'label' : 'Care and support' - }, - { - 'url' : 'https://www.nhs.uk/pregnancy/', - 'label' : 'Pregnancy' - }, - { - 'url' : 'https://www.nhs.uk/nhs-services/', - 'label' : 'NHS services' - } - ] - }) - }} + "search": true + }) }} {% endblock %} diff --git a/app/components/header/header-service-name-with-nav.njk b/app/components/header/header-service-name-with-nav.njk index d4680c3e6..0ea14124f 100644 --- a/app/components/header/header-service-name-with-nav.njk +++ b/app/components/header/header-service-name-with-nav.njk @@ -9,8 +9,9 @@ "service": { "name": "Digital service manual" }, - "showNav": "true", - "showSearch": "true", + "search": { + "visuallyHiddenLabel": "Search the NHS digital service manual" + }, "primaryLinks": [ { "url" : "#", diff --git a/app/components/header/header-service-name.njk b/app/components/header/header-service-name.njk index 8c5149e50..a5c1a6559 100644 --- a/app/components/header/header-service-name.njk +++ b/app/components/header/header-service-name.njk @@ -6,10 +6,9 @@ {% block body %} {{ header({ - "service": { - "name": "Prototype kit" - } - }) - }} + "service": { + "name": "Prototype kit" + } + }) }} {% endblock %} diff --git a/app/components/header/header-transactional-service-name.njk b/app/components/header/header-transactional-service-name.njk index 13038875d..ed53ebc4b 100644 --- a/app/components/header/header-transactional-service-name.njk +++ b/app/components/header/header-transactional-service-name.njk @@ -6,12 +6,9 @@ {% block body %} {{ header({ - "transactionalService": { - "name": "Find your NHS number" - }, - "showNav": "false", - "showSearch": "false" - }) - }} + "transactionalService": { + "name": "Find your NHS number" + } + }) }} {% endblock %} diff --git a/app/components/header/index.njk b/app/components/header/index.njk index 3754df755..857b22385 100644 --- a/app/components/header/index.njk +++ b/app/components/header/index.njk @@ -6,35 +6,33 @@ {% block body %} {{ header({ - "showNav": "true", - "showSearch": "true", - "primaryLinks": [ - { - "url" : "https://www.nhs.uk/conditions", - "label" : "Health A-Z" - }, - { - 'url' : 'https://www.nhs.uk/live-well/', - 'label' : 'Live Well' - }, - { - 'url' : 'https://www.nhs.uk/mental-health/', - 'label' : 'Mental health' - }, - { - 'url' : 'https://www.nhs.uk/conditions/social-care-and-support/', - 'label' : 'Care and support' - }, - { - 'url' : 'https://www.nhs.uk/pregnancy/', - 'label' : 'Pregnancy' - }, - { - 'url' : 'https://www.nhs.uk/nhs-services/', - 'label' : 'NHS services' - } - ] - }) - }} + "search": true, + "primaryLinks": [ + { + "url" : "https://www.nhs.uk/conditions", + "label" : "Health A-Z" + }, + { + 'url' : 'https://www.nhs.uk/live-well/', + 'label' : 'Live Well' + }, + { + 'url' : 'https://www.nhs.uk/mental-health/', + 'label' : 'Mental health' + }, + { + 'url' : 'https://www.nhs.uk/conditions/social-care-and-support/', + 'label' : 'Care and support' + }, + { + 'url' : 'https://www.nhs.uk/pregnancy/', + 'label' : 'Pregnancy' + }, + { + 'url' : 'https://www.nhs.uk/nhs-services/', + 'label' : 'NHS services' + } + ] + }) }} {% endblock %} diff --git a/packages/components/header/README.md b/packages/components/header/README.md index 2952f86d8..86b633ded 100644 --- a/packages/components/header/README.md +++ b/packages/components/header/README.md @@ -22,7 +22,7 @@ compiled JavaScript for all components `nhsuk.min.js` or the individual componen