Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 4, 2025

Bumps govuk-frontend from 5.8.0 to 5.9.0.

Release notes

Sourced from govuk-frontend's releases.

GOV.UK Frontend v5.9.0

To install this version with npm, run npm install govuk-frontend@5.9.0. You can also find more information about how to stay up to date in our documentation.

New features

Use our improved File upload component

We've added a JavaScript enhancement to the File upload component which:

  • makes the component easier to use for drag and drop
  • allows the text of the component to be translated
  • fixes accessibility issues for users of Dragon, a speech recognition software This improvement is opt-in, as it's a substantial visual change which risks shifting other content on the page. To enable this improvement for your users, you'll first need to update the markup of your File upload component:
  • if you use our Nunjucks macro, using the new javascript option of govukFileUpload
{{ govukFileUpload({
	id: "file-upload",
	name: "photo",
	label: {
		text: "Upload your photo"
	},
	javascript: true
}) }}
  • if you're using HTML, wrapping the <input type="file"> of the File upload markup in a <div class="govuk-drop-zone" data-module="govuk-file-upload">
<div class="govuk-form-group">
	<label class="govuk-label" for="file-upload-1">
		Upload your photo
	</label>
	<div class="govuk-drop-zone" data-module="govuk-file-upload">
		<input class="govuk-file-upload" id="file-upload" name="photo" type="file">
	</div>
</div>

If you're importing components individually in your JavaScript, which we recommend for better performance, you'll then need to import and initialise the new FileUpload component.

import {FileUpload} from 'govuk-frontend'
createAll(FileUpload)

This change was introduced in [pull request #5305: Add progressively enhanced File Upload component](alphagov/govuk-frontend#5305)

Form control components now have default id attributes

If you're using the included Nunjucks macros, these components now automatically use the value of the name parameter for the id parameter:

  • Text input
  • Textarea
  • Password input
  • Character count
  • File upload

... (truncated)

Changelog

Sourced from govuk-frontend's changelog.

v5.9.0 (Feature release)

To install this version with npm, run npm install govuk-frontend@5.9.0. You can also find more information about how to stay up to date in our documentation.

New features

Use our improved File upload component

We've added a JavaScript enhancement to the File upload component which:

  • makes the component easier to use for drag and drop
  • allows the text of the component to be translated
  • fixes accessibility issues for users of Dragon, a speech recognition software

This improvement is opt-in, as it's a substantial visual change which risks shifting other content on the page.

To enable this improvement for your users, you'll first need to update the markup of your File upload component:

  • if you use our Nunjucks macro, using the new javascript option of govukFileUpload

    {{ govukFileUpload({
      id: "file-upload",
      name: "photo",
      label: {
        text: "Upload your photo"
      },
      javascript: true
    }) }}
  • if you're using HTML, wrapping the <input type="file"> of the File upload markup in a <div class="govuk-drop-zone" data-module="govuk-file-upload">

    <div class="govuk-form-group">
      <label class="govuk-label" for="file-upload-1">
        Upload your photo
      </label>
      <div class="govuk-drop-zone" data-module="govuk-file-upload">
        <input class="govuk-file-upload" id="file-upload" name="photo" type="file">
      </div>
    </div>

If you're importing components individually in your JavaScript, which we recommend for better performance, you'll then need to import and initialise the new FileUpload component.

import {FileUpload} from 'govuk-frontend'
createAll(FileUpload)
</tr></table>

... (truncated)

Commits
  • d75bca5 Merge pull request #5773 from alphagov/release-5.9.0
  • 04a3261 Release 5.9.0
  • 587c99d Merge pull request #5772 from alphagov/bk-changelog-code-example-spacing
  • e8e5c0b Update changelog code example spacing
  • 717fcb1 Merge pull request #5770 from alphagov/release-5.9.0-changelog
  • ecba856 Update CHANGELOG for v5.9.0
  • 364ecec Merge pull request #5750 from alphagov/dependabot/npm_and_yarn/test-1ae1c220d8
  • c524b75 Merge pull request #5768 from alphagov/puppetter-core-test-explanations
  • 4984bfe Merge pull request #5305 from alphagov/spike-enhanced-file-upload
  • a753f46 Merge pull request #5721 from alphagov/bk-deprecation-field
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner March 4, 2025 14:43
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Mar 4, 2025
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/govuk-frontend-5.9.0 branch from 87011f3 to 75f907a Compare March 10, 2025 16:19
Bumps [govuk-frontend](https://github.com/alphagov/govuk-frontend) from 5.8.0 to 5.9.0.
- [Release notes](https://github.com/alphagov/govuk-frontend/releases)
- [Changelog](https://github.com/alphagov/govuk-frontend/blob/main/CHANGELOG.md)
- [Commits](alphagov/govuk-frontend@v5.8.0...v5.9.0)

---
updated-dependencies:
- dependency-name: govuk-frontend
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/govuk-frontend-5.9.0 branch from 75f907a to 5d7e98f Compare March 12, 2025 13:33
Copy link
Contributor

@syed87 syed87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn install and manual testing working fine locally, lgtm

@syed87 syed87 merged commit 568deb6 into main Mar 12, 2025
16 checks passed
@syed87 syed87 deleted the dependabot/npm_and_yarn/govuk-frontend-5.9.0 branch March 12, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant