Skip to content

Bump GovUk.Frontend.AspNetCore from 3.4.3 to 5.1.0 - #20

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/src/ReverseProxy/GovUk.Frontend.AspNetCore-5.1.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/nuget/src/ReverseProxy/GovUk.Frontend.AspNetCore-5.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 27, 2026

Copy link
Copy Markdown

Updated GovUk.Frontend.AspNetCore from 3.4.3 to 5.1.0.

Release notes

Sourced from GovUk.Frontend.AspNetCore's releases.

5.1.0

Targets GOV.UK Frontend v6.6.0.

New features

Character count count-type

<govuk-character-count> has a count-type attribute for how the text is counted:

  • CharacterCountType.Length (the default) counts as JavaScript's String.length does, as before.
  • CharacterCountType.Characters counts the characters a user would perceive, so an emoji or an accented letter counts as one.
  • CharacterCountType.Words counts words, making max-length a number of words.
<govuk-character-count for="MoreDetail" max-length="150" count-type="CharacterCountType.Words">
    <label>Can you provide more detail?</label>
</govuk-character-count>

CharacterCountType.Characters and CharacterCountType.Words need a browser that supports Intl.Segmenter.

Character count validation

[CharacterCount] and CharacterCountValidator validate text against a character count's limit on the server, counting it the same way as the component for each count-type:

[CharacterCount(150, CountType = CharacterCountType.Words, ErrorMessage = "Job description must be 150 words or fewer")]
public string? JobDescription { get; set; }

They count a line break as one character, as the browser does, though it's submitted as two.
See Character count validation.

Deprecations

The character count's max-words attribute is deprecated, following GOV.UK Frontend, and using it gives a GFA0008 warning; use max-length with count-type="CharacterCountType.Words" instead. max-words still works for now.
The two count words differently: max-words counts runs of characters separated by whitespace, so "well-known" is one word, whereas count-type="CharacterCountType.Words" makes it two and doesn't count punctuation on its own.
[MaxWords] and MaxWordsValidator continue to match max-words.

Fixes

  • MaxWordsValidator now treats the same characters as whitespace as the component's JavaScript does. Previously U+0085 separated words and U+FEFF didn't.

5.0.1

Targets GOV.UK Frontend v6.5.1.

Fixes

  • [MaxWords] and MaxWordsValidator threw an ArgumentNullException for a null value, so submitting an empty field failed the request instead of letting [Required] report the error. A null value is now considered valid.
  • The <title> now gets its "Error:" prefix when the error summary is generated in _GovUkPageTemplate's <main> element, which is the default. Previously the prefix was only added when the error summary was rendered before the <title>, such as with PrependToFormElements or a <govuk-error-summary> in the view.
  • Several tag helpers ignored a component's default when an optional attribute was left out, because an unset string attribute became an empty TemplateString rather than null.
  • The package now has a symbol package (.snupkg), so Source Link can step into the library's source when debugging.

5.0.0

Targets GOV.UK Frontend v6.5.1.

New features

Short tag names

All tag helpers now support short tag names for child elements:

<govuk-checkboxes for="ContactPreferences">
    <legend>How would you like to be contacted?</legend>
    <hint>Select all options that are relevant to you.</hint>
    <checkboxes-item value="email">
        Email
        <conditional>
            <govuk-input for="EmailAddress" type="email" input-class="govuk-!-width-one-third">
                <label>Email address</label>
            </govuk-input>
        </conditional>
    </checkboxes-item>
</govuk-checkboxes>

The old govuk- prefixed names are still supported.

Table tag helpers

<govuk-table first-cell-is-header="true">
    <table-caption class="govuk-table__caption--m">Dates and amounts</table-caption>
    <table-head>
        <table-head-cell>Date</table-head-cell>
        <table-head-cell format="numeric">Amount</table-head-cell>
    </table-head>
    <table-row>
        <table-cell>First 6 weeks</table-cell>
        <table-cell format="numeric">£109.80 per week</table-cell>
    </table-row>
</govuk-table>

The caption, head and rows go directly inside <govuk-table>, in that order. Each element also has a govuk-table- prefixed long name.

Language navigation tag helpers

<govuk-language-navigation>
    <language-navigation-item lang="en">English</language-navigation-item>
    <language-navigation-item lang="cy" asp-page="/Index" asp-route-lang="cy" language-description-text="Newid yr iaith i'r Cymraeg">Cymraeg</language-navigation-item>
</govuk-language-navigation>
 ... (truncated)

## 4.4.1

Targets GOV.UK Frontend v6.4.0.

### Fixes

Fixes an exception at startup when more than one application part references the package.
The build info is now read from the application's own assembly only, rather than from every application part.


## 4.4.0

Targets GOV.UK Frontend v6.4.0.

Added support for the interruption variant of the panel component, including the new `govuk-panel-actions`, `govuk-panel-action-button` and `govuk-panel-action-link` tag helpers.
Also adds short tag name support for the panel component.

The checkboxes, date input and radios components can now generate a fieldset without the `<govuk-checkboxes-fieldset>`, `<govuk-date-input-fieldset>` and `<govuk-radios-fieldset>` elements.
A `<govuk-checkboxes-fieldset-legend>`, `<govuk-date-input-fieldset-legend>` or `<govuk-radios-fieldset-legend>` element can now be placed directly inside the root element and the remaining child elements no longer have to be nested inside a fieldset element.
The root elements have also gained `fieldset-*`, `legend-*` and `legend-is-page-heading` attributes for the generated fieldset and legend, along with a `fieldset` attribute for when a fieldset is wanted but none of the other attributes or elements are used;
in that case the legend's content is deduced from the `for` attribute's `ModelMetadata`. The existing fieldset elements continue to work as before.

## 4.3.1

Targets GOV.UK Frontend v6.3.0.

### Fixes

Fixes an exception at startup when more than one application part references the package.
The build info is now read from the application's own assembly only, rather than from every application part.


## 4.3.0

Targets GOV.UK Frontend v6.3.0.

Added tag helpers for the generic header component.

Added `GetJavascriptFileName()` and `GetStylesheetFileName()` methods to `PageTemplateHelper`.

## 4.2.2

Targets GOV.UK Frontend v6.2.0.

### Fixes

Fixes an exception at startup when more than one application part references the package.
The build info is now read from the application's own assembly only, rather than from every application part.


## 4.2.1

Targets GOV.UK Frontend v6.2.0.

### Fixes

Fixes including copied assets in static asset manifest generation.

## 4.2.0

Targets GOV.UK Frontend v6.2.0.

### `govuk-frontend` asset support

#### SASS support

A SASS module has been added that provides functions for creating image and font URLs with a versioned query parameter.
When this query parameter is included in a request URL, middleware will add long-lived cache headers to the response, allowing aggressive caching of assets.
See [the SASS sample](samples/Samples.Sass) for an example of how to use this.

#### MSBuild property changes

> [!NOTE]
> The following changes only apply if you have enabled `RestoreGovUkFrontendNpmPackage` in your project file.

The `RestoreGovUkFrontendNpmPackage`, `GovUkFrontendNpmPackageLocation` and `CopyGovUkFrontendAssetsToWebRoot` MSBuild properties have been deprecated.
In their place is `EnableGovUkFrontendSupport`, `GovUkFrontendNpmPackageDirectory`, `GovUkFrontendAssetsDirectory`, `GovUkFrontendJavaScriptDirectory` and
`GovUkFrontendStylesheetDirectory`, enabling more fine-grained control over assets.

#### Static file support

The `_GovUkPageTemplate.cshtml` layout view now supports [static files](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-10.0).

### Tag helpers

`<govuk-file-upload>` now supports attributes for customising the text used by the JavaScript-enhanced file upload component:
`choose-files-button-text`, `drop-instruction-text`, `entered-drop-zone-text`, `left-drop-zone-text`,
`multiple-files-chosen-text-one`, `multiple-files-chosen-text-other` and `no-file-chosen-text`.

### Fixes

Fixes default navigation ID and menu button text on service navigation components.

Fixes `Cache-Control` header value for hosted stylesheet, javascript and static assets.

Fixes default button content on `<govuk-password-input>`.

## 4.1.1

Targets GOV.UK Frontend v6.1.0.

### New features

Adds `AddPageError` extension method to `HttpContext`.

## 4.1.0

Targets GOV.UK Frontend v6.1.0.

### Tag helpers

`<govuk-header>` can now have additional content specified.

The summary list tag helpers now support short tag name syntax.

## 4.0.1

Targets GOV.UK Frontend v6.0.0.

### Fixes

Removes some redundant properties from `HeaderOptions`.

Amends attribute propagation on `<govuk-service-navigation-nav-item>` to copy extra attributes onto generated `<li>` instead of the inner link.
Attributes for the `<a>` element can still be specified by using `link-*` attributes.

## 4.0.0

Targets GOV.UK Frontend v6.0.0.

### `_GovUkPageTemplate` view changes

Additional sections and `ViewData` keys have been added.

### Breaking changes

#### Page template

If you are using the `_GovUkPageTemplate` view, you may need to update your views to use the new section names.
Specifically, if you where using the `Header` section, consider using the `GovUkHeader` and/or `GovUkServiceNavigation` sections instead.
Similarly, if you were using the `Footer` section, consider using the `GovUkFooter` section instead.

See `src/GovUk.Frontend.AspNetCore/Views/_GovUkPageTemplate.cshtml` for the complete view implementation.

#### Tag helpers

The deprecated `asp-for` attribute has been removed from the tag helpers that generate form elements; the `for` attribute should be used instead.

The content licence and copyright sections are no longer included in the footer by default with the `<govuk-footer>` tag helper.
Add `<govuk-footer-content-licence />` and `<govuk-footer-copyright />` elements to include these sections if needed.

The deprecated `gfa-error-prefix` attribute on `<title>` elements has been removed; the `error-prefix` attribute should be used instead.

The deprecated `is-current` attribute on `<govuk-pagination-item>` has been removed; the `current` attribute should be used instead.

#### `GovUkFrontEndOptions`

The deprecated `StaticAssetsContentPath`, `CompiledContentPath`, `PrependErrorSummary` properties on `GovUkFrontendOptions` have been removed.
The `Rebrand` option has also been removed.

### New features

Adds support for the password tag helper's show/hide customisation.

Infer `type` attribute on `<govuk-input>` from the model metadata when `type` is not specified.

### Fixes

Fix error summary when items are specified with an explicit `href` attribute.


## 3.5.1

Targets GOV.UK Frontend v5.14.0.

### New features

Adds support for the password tag helper's show/hide customisation.

### Fixes

Fix error summary when items are specified with an explicit `href` attribute.

## 3.5.0

Targets GOV.UK Frontend v5.14.0.

Commits viewable in [compare view](https://github.com/x-govuk/govuk-frontend-aspnetcore/compare/v3.4.3...v5.1.0).
</details>

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=GovUk.Frontend.AspNetCore&package-manager=nuget&previous-version=3.4.3&new-version=5.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

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 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)


</details>

---
updated-dependencies:
- dependency-name: GovUk.Frontend.AspNetCore
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Oct 27, 2026
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 .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants