diff --git a/CHANGELOG.md b/CHANGELOG.md index bdee8d6a99..7dad994f15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -287,6 +287,21 @@ You don't need to change anything if you're using the `govukPagination` Nunjucks This change was introduced in [pull request #3899: Update default `aria-label` in Pagination component](https://github.com/alphagov/govuk-frontend/pull/3899). +#### Update the Exit this Page button's default text + +The default text of the Exit this Page button has been updated to indicate that the button is a safety tool and not a generic method of leaving the current page. If you are using the component's default label, you may wish to update it to the new value. + +```diff + +- Exit this page ++ Emergency Exit this page + +``` + +You don't need to change anything if you're using the `govukExitThisPage` Nunjucks macro. + +This change was introduced in [pull request #3989: Update default Exit This Page button text](https://github.com/alphagov/govuk-frontend/pull/3989). + ### Fixes We’ve made fixes to GOV.UK Frontend in the following pull requests: diff --git a/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.yaml b/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.yaml index 722fb643ab..a55cabf399 100644 --- a/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.yaml +++ b/packages/govuk-frontend/src/govuk/components/exit-this-page/exit-this-page.yaml @@ -2,11 +2,11 @@ params: - name: text type: string required: false - description: Text for the link. If `html` is provided, the `text` option will be ignored. Defaults to 'Exit this page'. + description: Text for the link. If `html` is provided, the `text` option will be ignored. Defaults to 'Emergency Exit this page' with 'Emergency' visually hidden. - name: html type: string required: false - description: HTML for the link. If `html` is provided, the `text` option will be ignored. + description: HTML for the link. If `html` is provided, the `text` option will be ignored. Defaults to 'Emergency Exit this page' with 'Emergency' visually hidden. - name: redirectUrl type: string required: false diff --git a/packages/govuk-frontend/src/govuk/components/exit-this-page/template.njk b/packages/govuk-frontend/src/govuk/components/exit-this-page/template.njk index a4d458335a..6f3e57637d 100644 --- a/packages/govuk-frontend/src/govuk/components/exit-this-page/template.njk +++ b/packages/govuk-frontend/src/govuk/components/exit-this-page/template.njk @@ -1,5 +1,9 @@ {% from "../button/macro.njk" import govukButton -%} +{% set defaultHtml -%} + Emergency Exit this page +{%- endset -%} +