From 869a8b08caf724319f2a913a0eb19c5951f8fefd Mon Sep 17 00:00:00 2001 From: beeps Date: Mon, 16 Sep 2024 18:44:20 +0100 Subject: [PATCH] =?UTF-8?q?Mark=20file=20upload=20=E2=80=98value=E2=80=99?= =?UTF-8?q?=20parameter=20as=20deprecated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 10 ++++++++++ .../src/govuk/components/file-upload/file-upload.yaml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b57a05bd..b60a7a9b99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ For advice on how to use these release notes see [our guidance on staying up to ## Unreleased +### Recommended changes + +#### Stop setting a `value` for File upload components + +The File upload component currently supports a `value` parameter, which populates the `value` HTML attribute of the input. + +However, since no modern browser supports passing a `value` to a file input, we've made the decision to remove this parameter. It has been deprecated and will be removed in a future version of GOV.UK Frontend. + +We introduced this change in [pull request #5330: Deprecate File upload component's `value` parameter](https://github.com/alphagov/govuk-frontend/pull/5330). + ## v5.7.0 (Feature release) To install this version with npm, run `npm install govuk-frontend@5.7.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. diff --git a/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.yaml b/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.yaml index 6506fde6eb..fde79e6588 100644 --- a/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.yaml +++ b/packages/govuk-frontend/src/govuk/components/file-upload/file-upload.yaml @@ -10,7 +10,7 @@ params: - name: value type: string required: false - description: Optional initial value of the input. + description: Deprecated. Optional initial value of the input. - name: disabled type: boolean required: false