Skip to content

Commit 782fba5

Browse files
authored
Merge pull request #5330 from alphagov/file-upload-deprecate-value-param
Deprecate File upload component's `value` parameter
2 parents 4e1ccea + 8a95be4 commit 782fba5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ For advice on how to use these release notes see [our guidance on staying up to
44

55
## Unreleased
66

7+
### Recommended changes
8+
9+
#### Stop setting a `value` for File upload components
10+
11+
The File upload component currently supports a `value` parameter, which populates the `value` HTML attribute of the input.
12+
13+
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.
14+
15+
We introduced this change in [pull request #5330: Deprecate File upload component's `value` parameter](https://github.com/alphagov/govuk-frontend/pull/5330).
16+
717
### Fixes
818

919
We've made fixes to GOV.UK Frontend in the following pull requests:

packages/govuk-frontend/src/govuk/components/file-upload/file-upload.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ params:
1010
- name: value
1111
type: string
1212
required: false
13-
description: Optional initial value of the input.
13+
description: Deprecated. Optional initial value of the input.
1414
- name: disabled
1515
type: boolean
1616
required: false

0 commit comments

Comments
 (0)