# Changelog For advice on how to use these release notes see [our guidance on staying up to date with changes](https://frontend.design-system.service.gov.uk/staying-up-to-date/). ## Unreleased ### Fixes We've made fixes to GOV.UK Frontend in the following pull requests: - [#5278: Fix service navigation mobile toggle spacing](https://github.com/alphagov/govuk-frontend/pull/5278) - [#5331: Fix Warning Text font weight when styles are reset](https://github.com/alphagov/govuk-frontend/pull/5331) - [#5352: Only apply margin to details summary when open](https://github.com/alphagov/govuk-frontend/pull/5352) - [#5089: Fix details expanded state not announced on iOS](https://github.com/alphagov/govuk-frontend/pull/5089) ## v5.6.0 (Feature release) To install this version with npm, run `npm install govuk-frontend@5.6.0`. You can also find more information about [how to stay up to date](https://frontend.design-system.service.gov.uk/staying-up-to-date/#updating-to-the-latest-version) in our documentation. ### New features #### Make it easier to navigate complex services with the Service navigation component We've added a new [Service navigation component](https://design-system.service.gov.uk/components/service-navigation/) to help users to navigate services with multiple top-level sections. This replaces the navigation functions of the Header component, which will be deprecated in a future release of GOV.UK Frontend. This component includes some features we consider experimental. We intend to iterate these features in response to user feedback. These are: - moving the service name from the Header to the Service navigation - providing slots for injecting custom HTML into specified locations within the component We introduced this change in [pull request #5206: Service navigation component](https://github.com/alphagov/govuk-frontend/pull/5206). ## v5.5.0 (Feature release) To install this version with npm, run `npm install govuk-frontend@5.5.0`. You can also find more information about [how to stay up to date](https://frontend.design-system.service.gov.uk/staying-up-to-date/#updating-to-the-latest-version) in our documentation. ### New features #### We've updated the list of organisations and brand colours included in Frontend We've overhauled the list of organisations and organisation brand colours that are shipped with GOV.UK Frontend. The previous list was outdated and had not kept up with changes to the machinery of government. We’ve updated the list to: - add all current government departments and their brand colours - add variants of brand colours that meet a 4.5:1 contrast ratio against white, where required - provide warnings if defunct organisations are still being referenced in your Sass code To enable these changes, set the feature flag variable `$govuk-new-organisation-colours` to `true` before you import GOV.UK Frontend in your Sass files: ```scss // application.scss $govuk-new-organisation-colours: true; @import "govuk-frontend/all"; ``` You can also silence warnings about defunct organisations by adding `organisation-colours` to the [`$govuk-suppressed-warnings`](https://frontend.design-system.service.gov.uk/sass-api-reference/#govuk-suppressed-warnings) setting. We introduced this change in [pull request #3407: Update organisation colours](https://github.com/alphagov/govuk-frontend/pull/3407). #### Stop long words breaking out of components with `govuk-!-text-break-word` We've added a new override class to help display long words with no obvious break points when the space is too narrow to display them on one line. An example of a long word might be an email address entered by a user. Wrapping the content with the `govuk-!-text-break-word` class forces words that are too long for the parent element to break onto a new line. ```html A confirmation email will be sent to arthur_phillip_dent.42@peoplepersonalitydivision.siriuscyberneticscorporation.corp. ``` Sass users can also use the `govuk-text-break-word` mixin. We introduced this change in [pull request #5159: Add break-word typography helper](https://github.com/alphagov/govuk-frontend/pull/5159). ### Recommended changes #### Update the `$websafe` parameter on the `govuk-organisation-colour` function The `govuk-organisation-colour` Sass function's `$websafe` parameter has been renamed to `$contrast-safe`. This is to more accurately describe the functionality of the parameter. The old parameter name will stop working in the next major version of GOV.UK Frontend. We introduced this change in [pull request #3407: Update organisation colours](https://github.com/alphagov/govuk-frontend/pull/3407). ### Fixes We've made fixes to GOV.UK Frontend in the following pull requests: - [#5046: Skip ‘empty’ tasks in the task list](https://github.com/alphagov/govuk-frontend/pull/5046) - [#5066: Fix whitespace affecting text alignment in pagination block variant](https://github.com/alphagov/govuk-frontend/pull/5066) - [#5158: Remove ↑ up and ↓ down arrow key bindings from tabs](https://github.com/alphagov/govuk-frontend/pull/5158) - [#5191: Fix rendering of Back link's `href` and `text` for falsy values](https://github.com/alphagov/govuk-frontend/pull/5191) ## 5.4.1 (Fix release) ### Recommended changes #### Update Breadcrumbs to use `nav` and `aria-label` We've made changes to the Breadcrumbs component to improve how it appears to screen readers. We've changed the wrapping element to use the `nav` tag to expose it as a navigational landmark, and added an `aria-label` attribute to differentiate it as breadcrumb navigation. This change was introduced in [pull request #4995: Update Breadcrumb component to improve screen reader accessibility](https://github.com/alphagov/govuk-frontend/pull/4995). ### Fixes We've made fixes to GOV.UK Frontend in the following pull requests: - [#5114: Fix divider width for small checkboxes](https://github.com/alphagov/govuk-frontend/pull/5114) – thanks to [@colinrotherham](https://github.com/colinrotherham) - [#5043: Refactor the accordion JavaScript](https://github.com/alphagov/govuk-frontend/pull/5043) - [#5044: Remove session storage checks from accordion JavaScript](https://github.com/alphagov/govuk-frontend/pull/5044) - [#5060: Reintroduce additional bottom margin to Error Summary content](https://github.com/alphagov/govuk-frontend/pull/5060) - [#5070: Fix alignment of content in conditional checkboxes and radio buttons](https://github.com/alphagov/govuk-frontend/pull/5070) - [#5090: Remove redundant tag CSS from phase banner](https://github.com/alphagov/govuk-frontend/pull/5090) ## 5.4.0 (Feature release) To install this version with npm, run `npm install govuk-frontend@5.4.0`. You can also find more information about [how to stay up to date](https://frontend.design-system.service.gov.uk/staying-up-to-date/#updating-to-the-latest-version) in our documentation. This release includes new features to help you include only the components your service uses. Doing this can help reduce the size of the JavaScript and CSS files sent to users, improving their experience. ### New features #### Create individual components with `createAll` We've added a new `createAll` function that lets you initialise specific components in the same way that `initAll` does. The `createAll` function will: - find all elements in the page with the corresponding `data-module` attribute - instantiate a component object for each element - catch errors and log them in the console - return an array of all the successfully instantiated component objects. ```js import { createAll, Button, Checkboxes } from 'govuk-frontend' createAll(Button) createAll(Checkboxes) ``` You can also pass a config object and a scope within which to search for elements. You can find out more about [how to use the `createAll` function](https://frontend.design-system.service.gov.uk/import-javascript/#import-individual-components) in our documentation. This change was introduced in [pull request #4975: Add `createAll` function to initialise individual components](https://github.com/alphagov/govuk-frontend/pull/4975). #### Use tabular numbers easily with `govuk-!-font-tabular-numbers` We've added a new override class for tabular number styling: `govuk-!-font-tabular-numbers`. Using tabular numbers can make it easier for users to read numbers intended for comparison to one another, or for numbers that dynamically update. It was previously only possible to use tabular numbers by using the `govuk-font-tabular-numbers` Sass mixin. This change was introduced in [pull request #4973: Add override class for tabular numbers](https://github.com/alphagov/govuk-frontend/pull/4973). ### Deprecated features #### Importing layers using `all` files You'll see a warning when compiling your Sass if you import any of our layers using the `all` file. Importing using the `all` files is deprecated, and we’ll remove them in the next major release. In your import statements, use a trailing `/index` rather than `/all` to load GOV.UK Frontend's files. For example: - `@import "govuk/index";` instead of `@import "govuk/all";`; - `@import "govuk//index";` instead of `@import "govuk//all";`; You do not need `/index` at the end of each import path if you’re using Dart Sass, LibSass 3.6.0 or higher, or Ruby Sass 3.6.0 or higher. This change was introduced in [pull request #4955: Rename `all` files to `index` for our Sass entry points](https://github.com/alphagov/govuk-frontend/pull/4955). ### Fixes We've made fixes to GOV.UK Frontend in the following pull requests: - [#4942: Remove duplicate `errorMessage` argument for the password input component](https://github.com/alphagov/govuk-frontend/pull/4942) - thanks to [Tim South](https://github.com/tim-s-ccs) for contributing this change - [#4961: Fix tree-shaking when importing `govuk-frontend`](https://github.com/alphagov/govuk-frontend/pull/4961) - [#4963: Fix input value not being set if the value was '0'](https://github.com/alphagov/govuk-frontend/pull/4963) – thanks to [@dwp-dmitri-algazin](https://github.com/dwp-dmitri-algazin) for reporting this issue - [#4971: Fix Error Summary component outputting list HTML when no `errorList` is provided](https://github.com/alphagov/govuk-frontend/pull/4971) - [#442: Update content to streamline installation info](https://github.com/alphagov/govuk-frontend-docs/pull/442) - [#438: Split up the 'Import CSS, assets and JavaScript' page](https://github.com/alphagov/govuk-frontend-docs/pull/438) ## 5.3.1 (Fix release) To install this version with npm, run `npm install govuk-frontend@5.3.1`. You can also find more information about [how to stay up to date](https://frontend.design-system.service.gov.uk/staying-up-to-date/#updating-to-the-latest-version) in our documentation. ### Fixes We've made fixes to GOV.UK Frontend in the following pull requests: - [#4906: Update the icon in the warning text component to match the defined text colour and background colour, rather than always being white on black](https://github.com/alphagov/govuk-frontend/pull/4906) - [#4919: Use canvas colour for cookie banner over hardcoded grey](https://github.com/alphagov/govuk-frontend/pull/4919) - [#4899: Remove indents from conditional reveals in radios and checkboxes](https://github.com/alphagov/govuk-frontend/pull/4899) - [#4935: Fix password input button unexpectedly stretching](https://github.com/alphagov/govuk-frontend/pull/4935) - [#4936: Fix skip link underline being removed when global styles are enabled](https://github.com/alphagov/govuk-frontend/pull/4936) - [#4938: Fix `attributes` option ignoring values passed from the `safe` filter ](https://github.com/alphagov/govuk-frontend/pull/4938) ## 5.3.0 (Feature release) To install this version with npm, run `npm install govuk-frontend@5.3.0`. You can also find more information about [how to stay up to date](https://frontend.design-system.service.gov.uk/staying-up-to-date/#updating-to-the-latest-version) in our documentation. ### New features #### Use the Password input component to help users accessibly enter passwords The [Password input component](https://design-system.service.gov.uk/components/password-input/) allows users to choose: - whether their passwords are visible or not - to enter their passwords in plain text This helps users use longer and more complex passwords without needing to remember what they've already typed. This change was introduced in [pull request #4442: Create password input component](https://github.com/alphagov/govuk-frontend/pull/4442). Thanks to [@andysellick](https://github.com/andysellick) for the original contribution. ### Recommended changes #### Update the HTML for the Character count component We've updated the HTML for the Character count component. The component wrapper `data-module="govuk-character-count"` and its form group `class="govuk-form-group"` are now combined as the same `
`. The hint text used as the count message now appears directly after the `